package com.wandian.game
{	
	import com.wandian.net.NetDispatcher;
	
	import flash.display.*;
	import flash.events.*;
	import flash.external.*;
	import flash.net.*;
	import flash.system.*;
	import flash.text.*;
	import flash.utils.*;
	
	public class GameDispatcher extends MovieClip
	{
		private var fGameIntroSoundCompleted_bl:Boolean;
		private var fSoundController_sc:SoundController;
		private var framerate_num:Number;
		private var fNetDispatcher_nd:NetDispatcher;
		private var fGameBackgroungDepthIndex_num:Number;
		public var indicators:MovieClip;
		public var fPercent_num:Number = 0;
		private var paramsDisp:ParamsDispatcher;
		public var playerMc:MovieClip;
		private var fIsVideoSkipped_bl:Boolean = false;
		private var fWaitingPreviewVideo_bl:Boolean = false;
		private var fSyncBalanceDisp_sbd:SyncBalanceDispatcher;
		private var fSessionId_str:String;
		private var fClickMeBonusResetRequired_bl:Boolean;
		private var isAddedToStage_bln:Boolean = false;
		private var isLoading:Boolean = true;
		public var preloaderBg_mc:MovieClip;
		private var isGameLoaded_:Boolean = false;
		public var tfLoader:TextField;
		private var fSoundValue_bl:Boolean = true;
		public var chooseCoin:MovieClip;
		private var fWorkerGrogBonus_wgb:WorkerGrogBonusController;
		private var bgPreloader:BgPreloader;
		private var autoPlayDisp:AutoPlayDispatcher;
		public var progressBar_mc:MCProgressBar;
		public var clickToStart_mc:MovieClip;
		private var fValidationKey_str:String;
		private var fPlayerController_pc:PlayerDispatcher;
		private var _indicators:Indicators;
		private var btnBlockUI:SimpleButton;
		private var fCoinSelector_chc:ChooseCoin;
		private var finsoftDisp:Object;
		private var fSpinButtonClicked_bl:Boolean;
		private var _fSoundOn_bl:Boolean = true;
		private var timeoutPtable:uint;
		private var fReelsSpinInProgress_b:Boolean = false;
		private var fPaytableController_pd:PaytableDispatcher;
		private var fDialogsController:DialogManager;
		private var _nNewBalance:Number;
		private var prevPercent:Number = 0;
		private var gameData:GameData;
		public var text_tf:TextField;
		private var reelsDisp:ReelsDispatcher;
		protected var fBigWinController_bwc:BigWinController;
		private var time1:Number;
		public var buttons_mc:Buttons;
		private var fButtons_btns:Buttons;
		private var fShouldBonusRestart_bl:Boolean = false;
		private var timeoutBonus:uint;
		public var infobar_mc:MCInfobar;
		public var gameBackground_mc:MovieClip;
		private var firstPercent:Boolean = true;
		private var fEnterResponseHasBeenReceived_bl:Boolean;
		private var isHostChekingCompleted_bln:Boolean = false;
		private var btnBlock:MovieClip;
		protected var fFreeSpinsController_fsc:FreeSpinsFeatureController;
		private var fGameBackground_mc:MovieClip;
		private var loaderGvSession:URLLoader;
		protected var fWildReelController_wrc:WildReelController;
		private var fDblink_str:String;
		private var fSwordFightBonus_sfbc:SwordFightBonusController;
		private var fKeyForEncryp_str:String = "";
		protected var fClickMeFeatureController_cfc:ClickMeFeatureController;
		public var btnAutoPlay:MovieClip;
		public static const EVENT_GAME_LOADING_ANIMATION_READY_TO_INIT:String = "onGameLoadingAnimationReadyToInit";
		public static const EVENT_MAIN_GAME_SPIN_STOPPED:String = "onMainGameSpinStopped";
		public static const EVENT_FREE_SPINS_BONUS_STARTED:String = "onFreeSpinsBonusStarted";
		public static const LABEL_VALIDATOR:String = "validator_lb";
		public static const EVENT_GAME_LOADING_ANIMATION_READY_TO_USE:String = "onGameLoadingAnimationReadyToUse";
		public static const EVENT_WILD_REEL_BONUS_STARTED:String = "onWildReelBonusStarted";
		public static const EVENT_READY_TO_ANIMATE_GAME_PRELOADER:String = "onReadyToAnimateGamePreloader";
		public static const EVENT_GAME_READY_FOR_INIT:String = "onGameReadyForInitialization";
		public static const EVENT_GAME_LOADING_STARTED:String = "onGameLoadingStarted";
		public static const EVENT_CLICKME_BONUS_RESET_COMPLETED:String = "onClickMeBonusResetCompleted";
		public static const EVENT_GAME_AUTO_PLAY:String = "onGameAutoPlay";
		public static const EVENT_LINES_SELECTED:String = "onLinesSelected";
		public static const LABEL_LOADING_COMPLETED:String = "loadingCompleted_lb";
		public static const LABEL_LOADING_ANIMATION:String = "loadingAnimation_lb";
		public static const EVENT_ASSETS_LOADING:String = "onEventAssetsLoading";
		public static const EVENT_MAIN_GAME_AUTOSPIN_STOPPED:String = "onMainGameAutoSpinStopped";
		public static const EVENT_SOUNDS_READY:String = "onGameSoundsReadyToUse";
		public static const EVENT_MAIN_GAME_SPIN_STARTED:String = "onMainGameSpinStarted";
		private static var fGameDispatcher_gd:GameDispatcher;
		public static const LABEL_INIT:String = "init";
		public static const EVENT_GET_ASSETS_SWF:String = "getAssetsSwf";
		public static const EVENT_COMMAND_SKIP_INTRO_SOUND:String = "onCommandSkipIntroSound";
		public static const EVENT_GAME_STARTED:String = "onGameStarted";
		public static const EVENT_BET_PER_LINE_CHANGED:String = "onBetPerLineChanged";
		
		public function GameDispatcher()
		{
			firstPercent = true;
			fPercent_num = 0;
			prevPercent = 0;
			isLoading = true;
			isHostChekingCompleted_bln = false;
			isAddedToStage_bln = false;
			fKeyForEncryp_str = "";
			isGameLoaded_ = false;
			fReelsSpinInProgress_b = false;
			fWaitingPreviewVideo_bl = false;
			fShouldBonusRestart_bl = false;
			fIsVideoSkipped_bl = false;
			fSoundValue_bl = true;
			_fSoundOn_bl = true;
			addFrameScript(2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
			Security.allowDomain("*");
			this.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
			addEventListener(Event.ADDED_TO_STAGE, onAdded, false);
			stop();
			return;
		}// end function
		
		private function onSoundButtonClicked(event:Event) : void
		{
			this.soundController.soundOn = !this.soundController.soundOn;
			return;
		}// end function
		
		public function updateBalanceForFinSoft(param1:Number) : void
		{
			this._nNewBalance = param1;
			if (this.fButtons_btns)
			{
				this.buttons.disableButtons();
			}
			lockBalanceFs(true);
			netDispatcher.sendUpdateBalance();
			return;
		}// end function
		
		public function startBigWinPresentation(param1:Boolean = true) : void
		{
			var _loc_2:BigWin = null;
			if (param1)
			{
				this.bigWinController.startFeature();
			}
			else
			{
				_loc_2 = new BigWin();
				_loc_2.addEventListener(BigWin.EVENT_BIG_WIN_PRESENTATION_STARTED, this.dispatchEvent);
				_loc_2.addEventListener(BigWin.EVENT_BIG_WIN_PRESENTATION_INTERRUPTED, this.onBigWinPresentationCompleted);
				_loc_2.addEventListener(BigWin.EVENT_BIG_WIN_PANEL_INTRO_ANIMATION_STARTED, this.dispatchEvent);
				_loc_2.addEventListener(BigWin.EVENT_BIG_WIN_PANEL_INTRO_ANIMATION_COMPLETED, this.dispatchEvent);
				_loc_2.addEventListener(BigWin.EVENT_BIG_WIN_COINS_FLOW_INTRO_ANIMATION_STARTED, this.dispatchEvent);
				_loc_2.addEventListener(BigWin.EVENT_BIG_WIN_VALUE_COUNTING_STARTED, this.dispatchEvent);
				_loc_2.addEventListener(BigWin.EVENT_BIG_WIN_VALUE_COUNTING_COMPLETED, this.dispatchEvent);
				_loc_2.addEventListener(BigWin.EVENT_BIG_WIN_COINS_FLOW_COMPLETE_ANIMATION_STARTED, this.dispatchEvent);
				_loc_2.addEventListener(BigWin.EVENT_BIG_WIN_PRESENTATION_COMPLETED, this.onBigWinPresentationCompleted);
				this.addChild(_loc_2);
				_loc_2.startBigWinPresentation(gameData.totalWin);
			}
			return;
		}// end function
		
		private function onGameLoadingAnimationStarted(event:Event = null) : void
		{
			this.initSoundController();
			this.dispatchEvent(new Event(EVENT_GAME_LOADING_STARTED));
			return;
		}// end function
		
		public function startAutoPlay(param1:Number, param2:Number, param3:Number, param4:Number) : void
		{
			var _loc_5:Number = NaN;
			trace("START_AUTO_PLAY");
			gameData.bAutoState = true;
			gameData.nAutoSpin = param4;
			_loc_5 = 0;
			while (_loc_5 < Const.COINS.length)
			{
				
				if (Const.COINS[_loc_5] == param2)
				{
					gameData.selectedCoin = _loc_5;
				}
				_loc_5 = _loc_5 + 1;
			}
			this.changeCoin(gameData.selectedCoin);
			gameData.selectedLines = param1;
			gameData.betCoins = param3;
			reelsDisp.onBetStructureRestored();
			releaseSpin();
			this.dispatchEvent(new Event(EVENT_GAME_AUTO_PLAY));
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				lockBalanceFs(true);
			}
			return;
		}// end function
		
		public function checkBonusMessage() : void
		{
			if (GameData.getInstance().getMessageType() != "")
			{
				onErrorResponse(GameData.getInstance().getMessageType(), GameData.getInstance().getTerminate());
				GameData.getInstance().setMessageType("");
				GameData.getInstance().setTerminate(false);
			}
			return;
		}// end function
		
		private function initPlayer() : void
		{
			if (CustomerSpecification.getInstance().videoPreviewHighQualityName == "" || CustomerSpecification.getInstance().videoPreviewMedQualityName == "" || CustomerSpecification.getInstance().videoPreviewLowQualityName == "")
			{
				this.onFinishVideoPreviewHandler();
				return;
			}
			this.fPlayerController_pc.getVideoUrl(Const.getFlashURL(this.loaderInfo.url), onGetVideoUrl);
			return;
		}// end function
		
		public function onBetStructureChanged() : void
		{
			if (isBetAcceptable(gameData.betCoins, gameData.selectedLines, gameData.selectedCoin))
			{
				this.reelsDisp.onBetStructureChanged();
				this.changeCoin(gameData.selectedCoin);
			}
			else
			{
				if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
				{
					this.reelsDisp.onBetStructureChanged();
					this.changeCoin(GameData.getInstance().selectedCoin);
					return;
				}
				gameData.betCoins = 0;
				this.onBetStructureChanged();
				this.showDialogNotEnoughMoneyForTheBet();
			}
			return;
		}// end function
		
		private function onWorkerGrogBonusWinCombinationPresentationCompleted(event:Event) : void
		{
			trace("GameDispatcher.onWorkerGrogBonusWinCombinationPresentationCompleted() called");
			ReelsDispatcher(event.target).removeEventListener(ReelsDispatcher.EVENT_WORKER_GROG_BONUS_WIN_COMBINATION_PRESENTATION_COMPLETED, this.onWorkerGrogBonusWinCombinationPresentationCompleted);
			this.stopWorkerGrogBonusWinCombinationPresentation();
			this.prepareWorkerGrogBonusToShow();
			return;
		}// end function
		
		public function set SESSIONID(param1:String) : void
		{
			trace("[GameDisp]: SESSIONID++++ " + param1);
			this.fSessionId_str = param1;
			return;
		}// end function
		
		protected function get netDispatcher() : NetDispatcher
		{
			if (!this.fNetDispatcher_nd)
			{
				this.initNetDispatcher();
			}
			return this.fNetDispatcher_nd;
		}// end function
		
		private function continueSwordFightBonus() : void
		{
			this.swordFightBonusController.continueSwordFightBonus(Math.random() > 0.5, Math.random() > 0.5, gameData.swordFightBonusActionsPayouts[0]);
			this.swordFightBonusController.continueSwordFightBonus(Math.random() > 0.5, Math.random() > 0.5, gameData.swordFightBonusActionsPayouts[1]);
			this.swordFightBonusController.continueSwordFightBonus(Math.random() > 0.5, Math.random() > 0.5, gameData.swordFightBonusActionsPayouts[2], gameData.swordFightBonusActionsPayouts[3]);
			return;
		}// end function
		
		public function restorePreviousBetStructure() : void
		{
			this.gameData.betController.rollbackPlanningBet();
			this.onBetStructureChanged();
			if (gameData.bAutoState)
			{
				autoPlayDisp.reset();
				gameData.bAutoState = false;
				update();
			}
			return;
		}// end function
		
		protected function loadNextFeatureAssetsModule() : void
		{
			if (!this.wildReelFeatureController.loadingInitialized)
			{
				this.wildReelFeatureController.addEventListener(SWFAssetLoader.EVENT_LOADING_COMPLETED, this.onFeatureAssetsModuleLoaded);
				this.wildReelFeatureController.startToLoadFeature();
			}
			else if (!this.bigWinController.loadingInitialized)
			{
				this.bigWinController.addEventListener(SWFAssetLoader.EVENT_LOADING_COMPLETED, this.onFeatureAssetsModuleLoaded);
				this.bigWinController.startToLoadFeature();
			}
			else if (!this.clickMeFeatureContoller.loadingInitialized)
			{
				this.clickMeFeatureContoller.addEventListener(SWFAssetLoader.EVENT_LOADING_COMPLETED, this.onFeatureAssetsModuleLoaded);
				this.clickMeFeatureContoller.startToLoadFeature();
			}
			else if (!this.freeSpinsFeatureController.loadingInitialized)
			{
				this.freeSpinsFeatureController.addEventListener(SWFAssetLoader.EVENT_LOADING_COMPLETED, this.onFeatureAssetsModuleLoaded);
				this.freeSpinsFeatureController.startToLoadFeature();
			}
			else
			{
				this.onAllFeaturesAssetsModulesLoaded();
			}
			return;
		}// end function
		
		protected function initDialogController() : void
		{
			if (this.fDialogsController)
			{
				return;
			}
			this.fDialogsController = new DialogManager(this);
			return;
		}// end function
		
		public function get SERVLET_URL() : String
		{
			return Const.SERVLET_NAME;
		}// end function
		
		public function startWildReelBonus() : void
		{
			this.onWildReelBonusStarted();
			this.addEventListener(ReelsDispatcher.EVENT_WILD_REEL_BONUS_INTRO_ANIMATION_STARTED, this.onWildReelIntroAnimationStarted);
			reelsDisp.startWildReelBonus(this.onWildReelBonusAnimationCompleted);
			return;
		}// end function
		
		public function onUpdateBalanceReceived() : void
		{
			GameData.getInstance().balance = this._nNewBalance;
			if (_indicators)
			{
				update();
			}
			tryUnlockExternalBalance();
			var _loc_1:* = finsoftDisp;
			_loc_1.finsoftDisp["balanceUpdated"]();
			var _loc_1:* = finsoftDisp;
			_loc_1.finsoftDisp["balanceUpdated"]();
			return;
		}// end function
		
		public function prepareSwordFightBonusToShow() : void
		{
			disableButtons();
			if (!this.swordFightBonusController.isLoaded)
			{
				this.addChild(this.swordFightBonusController.loadingProgressBar);
				this.delegateSoundButtonForTheSwordFightBonusPreloader();
			}
			this.swordFightBonusController.addEventListener(ExternFeatureController.EVENT_FEATURE_READY_TO_SHOW, this.onSwordFightBonusReadyToShow);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_INTRO_PANEL_CLICKED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_INTRO_PANEL_HIDDING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BUTTONS_INTRO_ANIMATION_STARTED, this.onSwordFightBonusButtonsIntroAnimationStarted);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BUTTON_PULSING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_DEATHMATCH_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_FOOTSTEP, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_LIGHT_FOOTSTEP, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_DOUBLE_FOOTSTEP, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_STUMBLE_FOOTSTEP, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_FIGHT_BUTTON_CLICKED, this.onSwordFightBonusFightButtonClicked);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_BUTTON_CLICKED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_SWORDS_CLASHING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_SWORD_SWISHING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_HERO_TAKES_A_HIT_BY_SLASH, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_HERO_TAKES_A_HIT_BY_THRUST, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_CAPTAIN_TAKES_A_HIT_BY_SLASH, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_CAPTAIN_TAKES_A_HIT_BY_THRUST, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_DEATHMATCH_INFO_PANEL_HIDDING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_DEATHMATCH_INFO_PANEL_SHOWING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_SELECT_NEXT_ATTACH_TIP_HIDDING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_FINAL_CAPTAIN_FALLING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_CAPTAIN_FALLEN_ON_THE_FLOOR, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_ROPES_CUTTING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_SWORD_SHEATHING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_BLOCK_TURNING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_BLOCK_TURNING_COMPLETED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_HERO_MAIDEN_LEFT_MOTION_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_HERO_MAIDEN_RIGHT_MOTION_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_DEATHMATCH_COMPLETED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_FINAL_WIN_PANEL_INCREASING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_FINAL_WIN_VALUE_COUNTING_STARTED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_FINAL_WIN_VALUE_COUNTING_COMPLETED, this.dispatchEvent);
			this.swordFightBonusController.addEventListener(SwordFightBonusController.EVENT_SWORDFIGHT_BONUS_COMPLETED, this.onSwordFightBonusCompleted);
			if (ParamsSpecification.isCreditsDisplay)
			{
				this.swordFightBonusController.startSwordFightBonus(this.gameData.swordFightBonusTotalPayout, this.gameData.swordFightBonusLasthandWinsHistory);
			}
			else
			{
				this.swordFightBonusController.startSwordFightBonus(this.gameData.swordFightBonusTotalPayout, this.gameData.swordFightBonusLasthandWinsHistory, gameData.storedCoinValue);
			}
			return;
		}// end function
		
		private function startClickMeBonus() : void
		{
			trace("GameDispatcher.startClickMeBonus() started...");
			reelsDisp.startClickMeBonus(this.onIconClickedInClickMeBonus, gameData.clickMeIconsPositions, gameData.clickMePayouts);
			trace("...GameDispatcher.startClickMeBonus() completed");
			return;
		}// end function
		
		private function onFreeSpinsIntroAnimationStarted(event:Event) : void
		{
			stage.frameRate = 24;
			this.dispatchEvent(event);
			return;
		}// end function
		
		public function showDialogNotEnoughMoneyForTheBet() : void
		{
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				return;
			}
			if (GameData.getInstance().freeRoundsMode)
			{
				return;
			}
			this.fDialogsController.showDialogNotEnoughMoneyForTheBet();
			return;
		}// end function
		
		private function delegateSoundButtonForTheWorkerBonus() : void
		{
			this.addChild(this.buttons.soundButton);
			this.buttons.soundButton.x = 400;
			this.buttons.soundButton.y = 75;
			return;
		}// end function
		
		protected function get freeSpinsFeatureController() : FreeSpinsFeatureController
		{
			if (!this.fFreeSpinsController_fsc)
			{
				this.fFreeSpinsController_fsc = new FreeSpinsFeatureController();
			}
			return this.fFreeSpinsController_fsc;
		}// end function
		
		private function initButtons()
		{
			if (this.fButtons_btns)
			{
				return;
			}
			this.fButtons_btns = this["buttons_mc"];
			this.fButtons_btns.disableButtons();
			this.fButtons_btns.addEventListener(Buttons.EVENT_BET_PER_LINE_BUTTON_CLICKED, this.onBetPerLineButtonClicked);
			this.fButtons_btns.addEventListener(Buttons.EVENT_MAX_BET_BUTTON_CLICKED, this.onMaxBetButtonClicked);
			this.fButtons_btns.addEventListener(Buttons.EVENT_SELECT_LINES_BUTTON_CLICKED, this.onSelectLinesButtonClicked);
			this.fButtons_btns.addEventListener(Buttons.EVENT_SPIN_BUTTON_CLICKED, this.onSpinButtonClicked);
			this.fButtons_btns.addEventListener(Buttons.EVENT_PAYTABLE_BUTTON_CLICKED, this.onShowPaytableButtonClicked);
			this.fButtons_btns.addEventListener(Buttons.EVENT_SOUND_BUTTON_CLICKED, this.onSoundButtonClicked);
			this.fButtons_btns.addEventListener(Buttons.EVENT_SWORD_FIGHT_BUTTON_CLICKED, this.onSwordFightBonusButtonClicked);
			this.fButtons_btns.addEventListener(Buttons.EVENT_BUTTON_CLICKED, this.dispatchEvent);
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				fButtons_btns.soundButton.visible = false;
				this["btnAutoPlay"].y = 12.5;
			}
			return;
		}// end function
		
		public function get autoPlayInProgress() : Boolean
		{
			return gameData.bAutoState;
		}// end function
		
		private function loadReels() : void
		{
			reelsDisp = new ReelsDispatcher(this);
			reelsDisp.load();
			return;
		}// end function
		
		public function get spinInProgress() : Boolean
		{
			return this.fReelsSpinInProgress_b;
		}// end function
		
		private function startToShowStandardWin(param1:Function = null) : void
		{
			trace("3_START_TO_SHOW_STANDART_WIN");
			reelsDisp.startToShowStandardWin(param1);
			return;
		}// end function
		
		private function preapreTranslationAssets() : void
		{
			new TranslationController(this);
			if (TranslationController.getInstance().translationAssetsReadyToUse)
			{
				this.onTranslationAssetsReadyToUse();
			}
			else
			{
				TranslationController.getInstance().addEventListener(TranslationController.EVENT_TRANSLATION_UPDATED, this.onTranslationAssetsReadyToUse);
				this.addEventListener(EVENT_ASSETS_LOADING, this.onEventAssetsLoading);
				TranslationController.getInstance().addEventListener(TranslationController.EVENT_LANGUAGE_XML_LOADED, this.onLanguageXmlLoaded);
			}
			return;
		}// end function
		
		private function ioErrorHandler(event:IOErrorEvent) : void
		{
			trace("ioErrorHandler: " + event);
			return;
		}// end function
		
		private function startWorkerGrogBonusWinCombinationPresentation() : void
		{
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_WORKER_GROG_BONUS_WIN_COMBINATION_PRESENTATION_COMPLETED, this.onWorkerGrogBonusWinCombinationPresentationCompleted);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_WORKER_GROG_BONUS_WIN_COMBINATION_PRESENTATION_STARTED, this.dispatchEvent);
			this.reelsDisp.startWorkerGrogBonusWinCombinationPresentation(gameData.workerGrogBonusWinLines);
			return;
		}// end function
		
		function frame7()
		{
			this.stop();
			return;
		}// end function
		
		function frame3()
		{
			this.dispatchEvent(new Event(EVENT_SOUNDS_READY));
			this.dispatchEvent(new Event(EVENT_ASSETS_LOADING));
			trace("----- EVENT_ASSETS_LOADING");
			stop();
			return;
		}// end function
		
		function frame6()
		{
			this.dispatchEvent(new Event(EVENT_GAME_READY_FOR_INIT));
			return;
		}// end function
		
		protected function onSwordFightBonusButtonsIntroAnimationStarted(event:Event) : void
		{
			trace("GameDispatcher.onSwordFightBonusButtonsIntroAnimationStarted() called");
			this.dispatchEvent(event);
			return;
		}// end function
		
		function frame4()
		{
			play();
			return;
		}// end function
		
		function frame5()
		{
			play();
			return;
		}// end function
		
		private function loadCustomerSpecification() : void
		{
			var _loc_1:CustomerSpecification = null;
			var _loc_2:String = null;
			trace("[GameDispatcher] loadCustomerSpecification, loaderInfo.url = " + this.loaderInfo.url);
			trace("[GameDispatcher] loadCustomerSpecification, Const.getFlashURL = " + Const.getFlashURL(this.loaderInfo.url));
			trace("[GameDispatcher] loadCustomerSpecification, Const.SITEPATH  = " + Const.SITEPATH);
			this.stop();
			_loc_1 = CustomerSpecification.getInstance();
			_loc_1.addEventListener(CustomerSpecification.EVENT_UPDATED, this.onCustomerSpecUpdated);
			_loc_2 = Const.getFlashURL(this.loaderInfo.url);
			trace("[GameDispatcher]: loadCustomerSpecification url " + _loc_2);
			trace("[GameDispatcher]: loadCustomerSpecification SITEPATH " + Const.SITEPATH);
			if (Const.SITEPATH != "undefined" && Const.SITEPATH != "")
			{
				_loc_2 = Const.SITEPATH + Const.GAME_PATH;
			}
			_loc_1.startLoading(_loc_2);
			return;
		}// end function
		
		private function onIconClickedInClickMeBonus(param1:Number) : void
		{
			var _loc_2:URLVariables = null;
			_loc_2 = new URLVariables();
			_loc_2.CHOICE = param1;
			sendRequest(NetDispatcher.ACTION_BONUS, _loc_2);
			return;
		}// end function
		
		private function continueWorkerGrogBonus() : void
		{
			trace("GameDispatcher.continueWorkerGrogBonus() called");
			this.workerGrogBonusController.continueWorkerGrogBonus(gameData.workerGrogBonusPlayerWins, gameData.workerGrogBonusPayout, !gameData.workerGrogBonusRequired);
			return;
		}// end function
		
		public function get waitingPreviewVideo() : Boolean
		{
			return fWaitingPreviewVideo_bl;
		}// end function
		
		private function srartPlayerPlay() : void
		{
			if (this.fPlayerController_pc.isNotInit)
			{
				this.fPlayerController_pc.waitingStart = true;
				return;
			}
			if (this.fIsVideoSkipped_bl)
			{
				return;
			}
			this.fPlayerController_pc.start();
			return;
		}// end function
		
		private function initErrorController() : void
		{
			new ErrorsController(this, this.loaderInfo.parameters);
			ErrorsController.getInstance().addEventListener(ErrorsController.EVENT_ERROR_XML_LOADED, this.errorXMLIsReadyForUsing);
			ErrorsController.getInstance().tryLoadErrorXML();
			return;
		}// end function
		
		private function onTranslationAssetsReadyToUse(event:Event = null) : void
		{
			if (event)
			{
				TranslationController(event.target).removeEventListener(TranslationController.EVENT_TRANSLATION_UPDATED, this.onTranslationAssetsReadyToUse);
			}
			this.registerTranslationAssetsInTheAssetsLibrary();
			this.addEventListener(EVENT_GAME_LOADING_ANIMATION_READY_TO_USE, this.startGameLoadingAnimation);
			this.dispatchEvent(new Event(EVENT_GAME_LOADING_ANIMATION_READY_TO_USE));
			return;
		}// end function
		
		private function get swordFightBonusController() : SwordFightBonusController
		{
			if (!this.fSwordFightBonus_sfbc)
			{
				this.initSwordFightBonusController();
			}
			return this.fSwordFightBonus_sfbc;
		}// end function
		
		public function get winController() : EventDispatcher
		{
			return reelsDisp.winController;
		}// end function
		
		private function onMainGameSpinStopped() : void
		{
			this.dispatchEvent(new Event(EVENT_MAIN_GAME_SPIN_STOPPED));
			this.setState(GameData.STATE_RESULT);
			return;
		}// end function
		
		public function validatingHost() : Boolean
		{
			return Const.VALIDATING_HOST;
		}// end function
		
		public function showDialogSessionError() : void
		{
			var url:String;
			var request:URLRequest;
			trace("[GameDispatcher] showDialogSessionError, getCustomerId = " + CustomerSpecification.getCustomerId());
			trace("[GameDispatcher] showDialogSessionError, url_sessionerror = " + Const.URL_CASHIER);
			if ((CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_BETKLASS || CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_AAMS) && (Const.URL_SESSIONERROR != "" && Const.URL_SESSIONERROR != null))
			{
				url = Const.URL_SESSIONERROR;
				request = new URLRequest(url);
				try
				{
					trace("[GameDispatcher] showDialogSessionError, try navigate to url = " + url);
					navigateToURL(request, "_self");
				}
				catch (e:Error)
				{
					trace("[GameDispatcher] showDialogSessionError, catch: cant navigate to url = " + url);
				}
			}
			else
			{
				trace("[GameDispatcher] showDialogSessionError, showDialog DIALOG_TYPE_CRYTICAL_ERROR");
				this.dialogController.showDialog(DialogManager.DIALOG_TYPE_CRYTICAL_ERROR);
			}
			return;
		}// end function
		
		public function startWildReelFeature(param1:Boolean = true) : void
		{
			if (param1)
			{
				this.wildReelFeatureController.startFeature();
				GameData.getInstance().isFeature = true;
			}
			else
			{
				startWildReelBonus();
			}
			return;
		}// end function
		
		private function restoreSoundButtonAfterSwordFightBonus() : void
		{
			this.buttons.restoreSoundButton();
			return;
		}// end function
		
		public function set spinInProgress(param1:Boolean) : void
		{
			this.fReelsSpinInProgress_b = param1;
			return;
		}// end function
		
		private function onMaxBetButtonClicked(event:Event) : void
		{
			this.dispatchEvent(event);
			this.releaseBetMax(null);
			return;
		}// end function
		
		public function set KEY(param1:String) : void
		{
			this.fValidationKey_str = param1;
			return;
		}// end function
		
		public function onParamsLoaded(param1:Boolean) : void
		{
			if (!param1)
			{
				return;
			}
			loadReels();
			return;
		}// end function
		
		public function get featureRequired() : Boolean
		{
			return gameData.featureRequired;
		}// end function
		
		private function _getSoundOn() : Boolean
		{
			return this.fSoundController_sc ? (var _loc_1:* = this.fSoundController_sc.soundOn, this._fSoundOn_bl = this.fSoundController_sc.soundOn, _loc_1) : (this._fSoundOn_bl);
		}// end function
		
		protected function tryToStartFeaturesAssetsModulesLoading() : void
		{
			this.loadNextFeatureAssetsModule();
			return;
		}// end function
		
		private function stopToShowStandardWin() : void
		{
			trace("4_STOP_TO_SHOW_STANDART_WIN");
			reelsDisp.stopToShowStandardWin();
			return;
		}// end function
		
		private function onFreeSpinsBonusStarted() : void
		{
			this.dispatchEvent(new Event(EVENT_FREE_SPINS_BONUS_STARTED));
			return;
		}// end function
		
		public function hostCheckingCompleted(param1:String) : void
		{
			this.fKeyForEncryp_str = param1;
			trace(this.fKeyForEncryp_str);
			this.isHostChekingCompleted_bln = true;
			if (this.parent != null)
			{
				this.onAdded();
			}
			return;
		}// end function
		
		private function onWorkerGrogBonusTailSelected(event:Event) : void
		{
			var _loc_2:URLVariables = null;
			this.dispatchEvent(event);
			_loc_2 = new URLVariables();
			_loc_2.CHOICE = 1;
			sendRequest(NetDispatcher.ACTION_BONUS, _loc_2);
			return;
		}// end function
		
		private function delegateSoundButtonForThePaytable() : void
		{
			this.moveSoundButtonToFront();
			return;
		}// end function
		
		private function progressPreloader(event:ProgressEvent) : void
		{
			var _loc_2:int = 0;
			_loc_2 = Math.round(event.bytesLoaded / event.bytesTotal * 100 / 2);
			animatePreloader(_loc_2);
			return;
		}// end function
		
		private function onFreeSpinsBonusCompleted() : void
		{
			this.setState(GameData.STATE_RESULT);
			return;
		}// end function
		
		private function onGameStarted() : void
		{
			this.dispatchEvent(new Event(EVENT_GAME_STARTED));
			if (this.isLastHand)
			{
				this.update();
				if (this.fWaitingPreviewVideo_bl)
				{
					this.fShouldBonusRestart_bl = true;
				}
				else
				{
					this.startNextRequiredFeature();
				}
				if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
				{
					lockBalanceFs(true);
				}
			}
			return;
		}// end function
		
		public function update() : void
		{
			updateButtons();
			updateIndicators();
			return;
		}// end function
		
		public function isBonusRoundCompleted(param1:String, param2:String) : String
		{
			var _loc_3:Boolean = false;
			_loc_3 = GameData.getInstance().isFeature;
			trace("[isBonusRoundCompleted]: aIsFeature_bl " + _loc_3);
			if (!_loc_3)
			{
				return "false";
			}
			JSCaller.getInstance().setFunctionBonusRoundOnComplete(param1, param2);
			return "true";
		}// end function
		
		private function releaseSelectLines(event:Event = null) : void
		{
			this.removeEventListener(EVENT_CLICKME_BONUS_RESET_COMPLETED, this.releaseSelectLines);
			if (gameData.state == GameData.STATE_RESULT)
			{
				reelsDisp.resetLines();
				setState(GameData.STATE_PLACEBET);
			}
			if (this.fClickMeBonusResetRequired_bl)
			{
				this.fClickMeBonusResetRequired_bl = false;
				this.addEventListener(EVENT_CLICKME_BONUS_RESET_COMPLETED, this.releaseSelectLines);
				this.resetClickMeBonus();
				return;
			}
			reelsDisp.selectLines();
			this.onLinesSelected();
			return;
		}// end function
		
		public function get betPerLine() : Number
		{
			return gameData.betCoins;
		}// end function
		
		public function isBetAcceptable(param1:Number, param2:Number, param3:Number) : Boolean
		{
			var _loc_4:Number = NaN;
			if (GameData.getInstance().freeRoundsMode)
			{
				return true;
			}
			_loc_4 = param1 * param2 * Const.COINS[param3];
			return gameData.balance >= _loc_4;
		}// end function
		
		private function onSwordFightBonusCompleted(event:Event) : void
		{
			this.showGameBg();
			this.showButtons();
			this.reelsDisp.visible(true);
			this.removeChild(this.swordFightBonusController.content);
			this.restoreSoundButtonAfterSwordFightBonus();
			this.dispatchEvent(event);
			this.setState(GameData.STATE_RESULT);
			return;
		}// end function
		
		private function releaseSpin(param1:Boolean = false) : void
		{
			var _loc_2:Number = NaN;
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				if (!isBetAcceptable(GameData.getInstance().betCoins, GameData.getInstance().selectedLines, GameData.getInstance().selectedCoin))
				{
					this.updateIndicators();
					var _loc_3:* = finsoftDisp;
					_loc_3.finsoftDisp["checkFunds"]();
					if (gameData.bAutoState)
					{
						autoPlayDisp.reset();
					}
					return;
				}
			}
			gameData.bBetDeduct = true;
			this.disableButtons();
			this.spinButtonClicked = true;
			if (gameData.state == GameData.STATE_RESULT)
			{
				setState(GameData.STATE_PLACEBET);
			}
			GameData.getInstance().betSum = GameData.getInstance().betSum + GameData.getInstance().getTotalBet() * GameData.getInstance().getCoinValue();
			this.startSpin();
			this.spinButtonClicked = false;
			if (GameData.getInstance().freeRoundsMode && param1 == true)
			{
				_loc_2 = GameData.getInstance().freeRoundsCount;
				_loc_2 = _loc_2 - 1;
				updateFreeRoundsCount(_loc_2);
			}
			this.fSyncBalanceDisp_sbd.roundCompleted = false;
			return;
		}// end function
		
		private function stopWorkerGrogBonusWinCombinationPresentation() : void
		{
			this.reelsDisp.stopWorkerGrogBonusWinCombinationPresentation();
			return;
		}// end function
		
		private function onWorkerGrogBonusCompleted(event:Event) : void
		{
			trace("GameDispatcher.onWorkerGrogBonusCompleted() called");
			this.showGameBg();
			this.showButtons();
			this.reelsDisp.visible(true);
			this.removeChild(this.workerGrogBonusController.content);
			this.restoreSoundButtonAfterWorkerBonus();
			this.dispatchEvent(event);
			this.setState(GameData.STATE_RESULT);
			return;
		}// end function
		
		private function onPaytableClosed(event:Event) : void
		{
			PaytableDispatcher(event.target).removeEventListener(PaytableDispatcher.EVENT_PAYTABLE_CLOSED, this.onPaytableClosed);
			this.removeChild(PaytableDispatcher(event.target).content);
			this.buttons.restoreSoundButton();
			if (gameData.state == GameData.STATE_RESULT)
			{
				this.startToShowWin();
			}
			this.updateButtons();
			return;
		}// end function
		
		public function resetCollectedBonuses() : void
		{
			this.gameData.holdWildReelForTheNextSpin = false;
			return;
		}// end function
		
		public function get freeSpinsBonusController() : EventDispatcher
		{
			return reelsDisp.freeSpinsBonusController;
		}// end function
		
		private function onStandardWinShowed() : void
		{
			trace("2_ON_STANDART_WIN_SHOWED");
			if (gameData.featureRequired)
			{
				this.stopToShowStandardWin();
				this.startNextRequiredFeature();
			}
			else if (gameData.bigWinPresentationRequired)
			{
				this.stopToShowStandardWin();
				this.startBigWinPresentation();
			}
			else
			{
				if (gameData.bAutoState && reelsDisp.winPresentationPeriod != 0)
				{
					var _loc_1:* = gameData;
					var _loc_2:* = gameData.nAutoSpin - 1;
					_loc_1.nAutoSpin = _loc_2;
					if (gameData.nAutoSpin == 0)
					{
						gameData.bAutoState = false;
						update();
						autoPlayDisp.setButtonAutoPlay(true);
						if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
						{
							lockBalanceFs(false);
						}
					}
					else
					{
						clearTimeout(time1);
						time1 = setTimeout(releaseSpin, 1500);
					}
					return;
				}
				this.startToShowStandardWin(this.onStandardWinShowed);
			}
			return;
		}// end function
		
		public function syncSoundBtnWithGv() : void
		{
			var _loc_1:Object = null;
			var _loc_2:Boolean = false;
			trace("[GameDispatcher]: syncSoundBtnWithGv ");
			_loc_1 = Object(this.parent.parent.parent);
			_loc_2 = _loc_1.getSound();
			setSoundFromGv(_loc_2);
			return;
		}// end function
		
		public function lockUI(param1:Boolean = false) : void
		{
			var bLock:* = param1;
			btnBlock = new McBtnBlock();
			if (bLock)
			{
				btnBlock.width = this.stage.width;
				btnBlock.height = this.stage.height;
				btnBlock.alpha = 0;
				this.addChild(btnBlock);
			}
			else
			{
				try
				{
					this.removeChild(btnBlock);
					btnBlock = null;
				}
				catch (e:Error)
				{
				}
			}
			return;
		}// end function
		
		public function getLoading() : Boolean
		{
			return this.isLoading;
		}// end function
		
		private function onGetVideoUrl(param1:String) : void
		{
			this.fPlayerController_pc.init(this.playerMc, param1);
			if (this.fPlayerController_pc.waitingStart)
			{
				this.fPlayerController_pc.waitingStart = false;
				srartPlayerPlay();
			}
			return;
		}// end function
		
		private function continueClickMeBonus() : void
		{
			this.clickMeBonusController.addEventListener("onClickMePayoutShowed", this.onClickMePayoutShowed);
			reelsDisp.continueClickMeBonus(this.onClickMeBonusCompleted, gameData.clickMePayouts);
			return;
		}// end function
		
		private function get workerGrogBonusInProgress() : Boolean
		{
			return this.workerGrogBonusController.featureInProgress;
		}// end function
		
		public function getFinsoftLang() : String
		{
			var _loc_1:* = finsoftDisp;
			return _loc_1.finsoftDisp["getLangURL"]();
		}// end function
		
		public function openCashier() : void
		{
			var _loc_1:Object = null;
			trace("[GameDispatcher]: openCashier ");
			_loc_1 = Object(this.parent.parent.parent);
			_loc_1.openCashier();
			return;
		}// end function
		
		public function initGame() : void
		{
			trace("[GameDispatcher] initGame");
			return;
		}// end function
		
		public function getLanguageType() : String
		{
			var _loc_1:Number = NaN;
			var _loc_2:Number = NaN;
			_loc_1 = ParamsSpecification.getInstance().languageXMLUrl.indexOf("language_");
			_loc_2 = ParamsSpecification.getInstance().languageXMLUrl.indexOf(".xml");
			return ParamsSpecification.getInstance().languageXMLUrl.substring(_loc_1 + 9, _loc_2);
		}// end function
		
		private function registerTranslationAssetsInTheAssetsLibrary() : void
		{
			AssetsLibrary.getInstance().addLibrary(TranslationController.getInstance().translationAssetsLibrary);
			return;
		}// end function
		
		public function getUrlLoadedGv() : String
		{
			var _loc_1:String = null;
			var _loc_2:String = null;
			trace("[GameDispatcher]: getUrlLoadedGv SITEPATH " + Const.SITEPATH);
			trace("[GameDispatcher]: getUrlLoadedGv loaderInfo " + this.loaderInfo.url);
			_loc_1 = Const.getFlashURL(this.loaderInfo.url);
			trace("[GameDispatcher]: getUrlLoadedGv urlLoaded " + _loc_1);
			_loc_2 = "";
			if (Const.SITEPATH != "undefined" && Const.SITEPATH != "")
			{
				_loc_2 = Const.SITEPATH + Const.GAME_PATH;
			}
			else
			{
				_loc_2 = _loc_1;
			}
			trace("[GameDispatcher]: getUrlLoadedGv url " + _loc_2);
			return _loc_2;
		}// end function
		
		protected function onSwordFightBonusFightButtonClicked(event:Event) : void
		{
			var _loc_2:URLVariables = null;
			this.dispatchEvent(event);
			_loc_2 = new URLVariables();
			_loc_2.CHOICE = this.swordFightBonusController.playerChoice;
			sendRequest(NetDispatcher.ACTION_BONUS, _loc_2);
			return;
		}// end function
		
		public function get selectedLines() : Number
		{
			return gameData.selectedLines;
		}// end function
		
		private function startGameInitialization(event:Event) : void
		{
			trace("[GameDispatcher] startGameInitialization");
			this.stop();
			this.loadParams();
			return;
		}// end function
		
		public function get workerGrogBonusPlayerWins() : Boolean
		{
			return gameData.workerGrogBonusPlayerWins;
		}// end function
		
		protected function initNetDispatcher() : void
		{
			if (this.fNetDispatcher_nd)
			{
				return;
			}
			this.fNetDispatcher_nd = new NetDispatcher(this);
			this.fNetDispatcher_nd.setKey(this.fKeyForEncryp_str);
			this.fNetDispatcher_nd.addEventListener(NetDispatcher.EVENT_NET_ERROR_OCCURED, this.onCryticalErrorOccured);
			return;
		}// end function
		
		private function showGameBg() : void
		{
			this.addChildAt(this.gameBackground, this.fGameBackgroungDepthIndex_num);
			return;
		}// end function
		
		public function loading() : void
		{
			if (loaderInfo.bytesLoaded < loaderInfo.bytesTotal)
			{
				loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressLoadingPreloader);
			}
			else
			{
				isLoading = false;
			}
			return;
		}// end function
		
		public function get autoSpinsRemains() : Number
		{
			return gameData.nAutoSpin;
		}// end function
		
		private function startGameLoadingAnimation(event:Event = null) : void
		{
			if (event)
			{
				GameDispatcher(event.target).removeEventListener(EVENT_GAME_LOADING_ANIMATION_READY_TO_USE, this.startGameLoadingAnimation);
			}
			this.stop();
			if (loaderInfo.bytesLoaded < loaderInfo.bytesTotal)
			{
				loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressPreloader, true);
				loaderInfo.addEventListener(Event.COMPLETE, completePreloader);
			}
			else
			{
				animatePreloader(50);
				completePreloader(null);
			}
			return;
		}// end function
		
		public function onReelsLoadProgress(param1:Number) : void
		{
			animatePreloader(50 + Math.ceil(param1 / 2));
			return;
		}// end function
		
		public function setState(param1:Number) : void
		{
			var _loc_2:URLVariables = null;
			trace("[GameDispatcher] setState, state = " + param1);
			gameData.state = param1;
			switch(param1)
			{
				case GameData.STATE_ENTER:
				{
					_loc_2 = new URLVariables();
					isGameLoaded_ = true;
					switch(CustomerSpecification.getCustomerId())
					{
						case CustomerSpecification.CUSTOMER_ID_CSC:
						{
							_loc_2["KEY"] = this.KEY;
							break;
						}
						case CustomerSpecification.CUSTOMER_ID_FINSOFT:
						{
							var _loc_3:* = finsoftDisp;
							if (_loc_3.finsoftDisp["isNeedUpdateBalance"]())
							{
								trace("[GameDispatcher] setState STATE_ENTER, isNeedUpdateBalance");
								setTimeout(setState, 1000, GameData.STATE_ENTER);
								var _loc_3:* = finsoftDisp;
								_loc_3.finsoftDisp["refreshBalance"]();
								return;
							}
							var _loc_3:* = finsoftDisp;
							if (_loc_3.finsoftDisp["isBalanceUpdated"]())
							{
								trace("[GameDispatcher] setState STATE_ENTER, isBalanceUpdated");
								setTimeout(setState, 500, GameData.STATE_ENTER);
								return;
							}
							lockBalanceFs(true);
							break;
						}
						default:
						{
							break;
							break;
						}
					}
					trace("[GameDispatcher] setState, send ENTER");
					sendRequest(NetDispatcher.ACTION_ENTER, _loc_2);
					break;
				}
				case GameData.STATE_ENTER_RESPONSE:
				{
					this.enterOk();
					this.fEnterResponseHasBeenReceived_bl = true;
					this.tryToStartGame();
					return;
				}
				case GameData.STATE_PLACEBET:
				{
					reelsDisp.showWin(false);
					update();
					break;
				}
				case GameData.STATE_PLACEBET_RESPONSE:
				{
					this.stopMainGameSpin();
					break;
				}
				case GameData.STATE_BONUS_RESPONSE:
				{
					this.continueBonus();
					break;
				}
				case GameData.STATE_RESULT:
				{
					if (gameData.wildReelRequired)
					{
						startWildReelFeature();
						return;
					}
					this.startToShowWin();
					this.spinInProgress = false;
					this.update();
					tryUnlockExternalBalance();
					break;
				}
				default:
				{
					break;
				}
			}
			return;
		}// end function
		
		private function updateFreeRoundsCount(param1:Number) : void
		{
			var _loc_2:Infobar = null;
			_loc_2 = this["infobar_mc"];
			_loc_2.updateFreeRoundsMessage(param1);
			return;
		}// end function
		
		private function stopMainGameSpin() : void
		{
			reelsDisp.stopSpin(this.onMainGameSpinStopped);
			return;
		}// end function
		
		private function onGameIntroSoundCompleted(event:Event) : void
		{
			this.fSoundController_sc.removeEventListener(SoundController.EVENT_GAME_INTRO_SOUND_COMPLETED, this.onGameIntroSoundCompleted);
			this.fGameIntroSoundCompleted_bl = true;
			this.tryToStartGame();
			return;
		}// end function
		
		private function initSwordFightBonusController() : void
		{
			if (this.fSwordFightBonus_sfbc)
			{
				return;
			}
			this.fSwordFightBonus_sfbc = new SwordFightBonusController(Const.getFlashURL(this.loaderInfo.url));
			return;
		}// end function
		
		private function initBet() : void
		{
			trace("GameDispatcher.initBet() called: this.gameData.isDefaultBet = " + this.gameData.isDefaultBet);
			trace("GameDispatcher.initBet() called: this.gameData.defaultBetPerLine = " + this.gameData.defaultBetPerLine);
			trace("GameDispatcher.initBet() called: this.gameData.defaultCoinId = " + this.gameData.defaultCoinId);
			trace("GameDispatcher.initBet() called: this.gameData.defaultNumberOfLines = " + this.gameData.defaultNumberOfLines);
			trace("GameDispatcher.initBet(): this.gameData.isLasthandBet = " + this.gameData.isLasthandBet);
			if (this.gameData.isLasthandBet)
			{
				this.gameData.applyLasthandBet();
				if (this.gameData.isLasthandBetAcceptable || CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
				{
					this.gameData.planLasthandBet();
				}
				else
				{
					this.gameData.planLasthandBetPartially();
				}
			}
			else if (this.gameData.isDefaultBet)
			{
				if (this.gameData.isDefaultBetAcceptable)
				{
					this.gameData.planDefaultBet();
				}
				else
				{
					this.gameData.planDefaultBetPartially();
					if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
					{
						this.gameData.planDefaultBet();
					}
					else
					{
						this.fDialogsController.showDialogNotEnoughMoneyForTheDefaultWager();
					}
				}
			}
			else
			{
				this.gameData.initZeroBet();
			}
			this.fCoinSelector_chc.setValue(gameData.selectedCoin);
			setCoinValue();
			this.reelsDisp.onBetStructureChanged();
			return;
		}// end function
		
		private function fillParamsFromPage() : void
		{
			var _loc_1:Object = null;
			if (Const.IS_DEBUG || CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				return;
			}
			if (Const.IS_DEBUG)
			{
				return;
			}
			framerate_num = this.loaderInfo.frameRate;
			this.stage.frameRate = 30;
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_GV)
			{
				getParamsGv();
				return;
			}
			_loc_1 = this.loaderInfo.parameters;
			Const.SESSIONID = _loc_1["SESSIONID"] ? (_loc_1["SESSIONID"]) : ("TESTSESSIONID");
			Const.DBLINK = _loc_1["DBLINK"] ? (_loc_1["DBLINK"]) : ("DBLINK");
			Const.URL_SESSIONERROR = _loc_1["URL_SESSIONERROR"];
			Const.URL_CASHIER = _loc_1["URL_CASHIER"];
			trace("Const.SESSIONID " + Const.SESSIONID);
			trace("Const.DBLINK " + Const.DBLINK);
			trace("Const.URL_CASHIER = " + Const.URL_CASHIER);
			return;
		}// end function
		
		private function onCustomerSpecUpdated(event:Event) : void
		{
			trace("GameDispatcher.onCustomerSpecUpdated(): CUSTOMER ID = " + CustomerSpecification.getCustomerId());
			this.preapreTranslationAssets();
			return;
		}// end function
		
		public function updateFinsoftFunCurrency() : void
		{
			Const.CURRENCY_FUN = TranslationController.getInstance().getAssetDescriptionById("TAFun").assetText + " ";
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				if (!ParamsSpecification.isRealMode())
				{
					ParamsSpecification.setCurrencySign(Const.CURRENCY_FUN, "");
				}
			}
			return;
		}// end function
		
		private function onSwordFightBonusReadyToShow(event:Event) : void
		{
			var aEvent_evnt:* = event;
			SwordFightBonusController(aEvent_evnt.target).removeEventListener(ExternFeatureController.EVENT_FEATURE_READY_TO_SHOW, this.onSwordFightBonusReadyToShow);
			try
			{
				this.removeChild(this.swordFightBonusController.loadingProgressBar);
			}
			catch (aError_err:Error)
			{
			}
			this.addChild(this.swordFightBonusController.content);
			this.delegateSoundButtonForTheSwordFightBonus();
			this.reelsDisp.visible(false);
			this.hideGameBg();
			this.hideButtons();
			return;
		}// end function
		
		private function onPaytableButtonClicked(event:Event) : void
		{
			this.dispatchEvent(event);
			this.showPaytable();
			return;
		}// end function
		
		protected function onFeatureAssetsModuleLoaded(event:Event) : void
		{
			SWFAssetLoader(event.target).removeEventListener(SWFAssetLoader.EVENT_LOADING_COMPLETED, this.onFeatureAssetsModuleLoaded);
			this.loadNextFeatureAssetsModule();
			return;
		}// end function
		
		private function initInfobar() : void
		{
			var _loc_1:Infobar = null;
			_loc_1 = this["infobar_mc"];
			if (!ParamsSpecification.isCreditsDisplay && CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				_loc_1.initCurrencyMode();
			}
			_loc_1.setGameController(this);
			_loc_1.setFreeSpinsBonusController(this.freeSpinsBonusController);
			return;
		}// end function
		
		private function onPaytableReady(event:Event) : void
		{
			var aEvent_evnt:* = event;
			try
			{
				this.removeChild(PaytableDispatcher(aEvent_evnt.target).loadingProgressBar);
			}
			catch (aError_err:Error)
			{
			}
			PaytableDispatcher(aEvent_evnt.target).addEventListener(PaytableDispatcher.EVENT_PAYTABLE_NEXT_PAGE_BUTTON_CLICKED, this.dispatchEvent);
			PaytableDispatcher(aEvent_evnt.target).addEventListener(PaytableDispatcher.EVENT_PAYTABLE_PREVIOUS_PAGE_BUTTON_CLICKED, this.dispatchEvent);
			PaytableDispatcher(aEvent_evnt.target).addEventListener(PaytableDispatcher.EVENT_PAYTABLE_RETURN_TO_GAME_BUTTON_CLICKED, this.dispatchEvent);
			this.addChild(PaytableDispatcher(aEvent_evnt.target).content);
			this.delegateSoundButtonForThePaytable();
			return;
		}// end function
		
		public function get DBLINK() : String
		{
			return this.fDblink_str;
		}// end function
		
		private function onSwordFightBonusWinCombinationPresentationCompleted(event:Event) : void
		{
			ReelsDispatcher(event.target).removeEventListener(ReelsDispatcher.EVENT_SWORD_FIGHT_BONUS_WIN_COMBINATION_PRESENTATION_COMPLETED, this.onSwordFightBonusWinCombinationPresentationCompleted);
			this.stopSwordFightBonusWinCombinationPresentation();
			this.prepareSwordFightBonusToShow();
			return;
		}// end function
		
		private function initPaytableController() : void
		{
			if (this.fPaytableController_pd)
			{
				return;
			}
			this.fPaytableController_pd = new PaytableDispatcher(Const.getFlashURL(this.loaderInfo.url));
			return;
		}// end function
		
		private function onBetPerLineChanged() : void
		{
			this.dispatchEvent(new Event(EVENT_BET_PER_LINE_CHANGED));
			return;
		}// end function
		
		private function onBigWinPresentationCompleted(event:Event) : void
		{
			BigWin(event.target).removeEventListener(BigWin.EVENT_BIG_WIN_PRESENTATION_COMPLETED, this.onBigWinPresentationCompleted);
			BigWin(event.target).removeEventListener(BigWin.EVENT_BIG_WIN_PRESENTATION_INTERRUPTED, this.onBigWinPresentationCompleted);
			gameData.bigWinPresentationRequired = false;
			this.dispatchEvent(event);
			this.removeChild(BigWin(event.target));
			this.setState(GameData.STATE_RESULT);
			return;
		}// end function
		
		private function initPlayerDispatcher() : void
		{
			this.fPlayerController_pc = new PlayerDispatcher(onFinishVideoPreviewHandler);
			this.fWaitingPreviewVideo_bl = true;
			this.soundOn = false;
			return;
		}// end function
		
		private function onFreeSpinsIntroAnimationCompleted(event:Event) : void
		{
			stage.frameRate = 31;
			this.dispatchEvent(event);
			return;
		}// end function
		
		public function initSessionByFinsoft(param1:Boolean) : void
		{
			trace("[GameDispatcher] initSessionByFinsoft " + param1 + " ");
			var _loc_2:* = finsoftDisp;
			ParamsSpecification.setRealMode(_loc_2.finsoftDisp["isRealMode"]());
			var _loc_2:* = finsoftDisp;
			GameData.getInstance().setFinsoftUrl(_loc_2.finsoftDisp["getServletUrl"]() + Const.SERVLET_NAME);
			var _loc_2:* = finsoftDisp;
			SESSIONID = _loc_2.finsoftDisp["getSessionId"]();
			var _loc_2:* = finsoftDisp;
			DBLINK = _loc_2.finsoftDisp["getDBLink"]();
			var _loc_2:* = finsoftDisp;
			initCreditsDisplayed(false, _loc_2.finsoftDisp["getCurrencyType"]());
			if (param1)
			{
				setState(GameData.STATE_ENTER);
			}
			return;
		}// end function
		
		private function onChangeCoin() : void
		{
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				this.changeCoin();
				return;
			}
			if (isBetAcceptable(gameData.betCoins, gameData.selectedLines, fCoinSelector_chc.getNextValue()))
			{
				this.changeCoin();
				return;
			}
			if (isBetAcceptable(gameData.betCoins, gameData.selectedLines, 0))
			{
				changeCoin(0);
			}
			else
			{
				this.showDialogNotEnoughMoneyForTheBet();
			}
			return;
		}// end function
		
		private function onSwordFightBonusButtonClicked(event:Event) : void
		{
			this.startSwordFightBonus();
			return;
		}// end function
		
		private function onClickMeBonusCompleted() : void
		{
			trace("GameDispatcher.onClickMeBonusCompleted() started...");
			this.fClickMeBonusResetRequired_bl = true;
			this.setState(GameData.STATE_RESULT);
			trace("...GameDispatcher.onClickMeBonusCompleted() completed");
			return;
		}// end function
		
		private function resetClickMeBonus() : void
		{
			reelsDisp.resetClickMeBonus();
			return;
		}// end function
		
		public function setFrameRate(param1:Number = 0) : void
		{
			trace("[GameDispather] setFrameRate frameRate " + this.stage.frameRate);
			trace("[GameDispather] setFrameRate newFrameRate " + param1);
			trace("[GameDispather] setFrameRate framerate_num " + framerate_num);
			if (param1 != 0)
			{
				this.stage.frameRate = param1;
			}
			else
			{
				this.stage.frameRate = framerate_num;
			}
			trace("[GameDispather] setFrameRate frameRate " + this.stage.frameRate);
			return;
		}// end function
		
		private function onPaytableLoadingCompleted(event:Event) : void
		{
			PaytableDispatcher(event.target).removeEventListener(FeatureLoader.EVENT_LOADING_COMPLETED, this.onPaytableLoadingCompleted);
			return;
		}// end function
		
		public function get currentWinLineId() : int
		{
			return this.reelsDisp.currentWinLineId;
		}// end function
		
		public function get workerGrogBonusRequired() : Boolean
		{
			return this.gameData.workerGrogBonusRequired;
		}// end function
		
		private function moveSoundButtonToFront() : void
		{
			this.addChild(this.buttons.soundButton);
			this.buttons.soundButton.x = this.buttons.soundButtonX + 2;
			this.buttons.soundButton.y = this.buttons.soundButtonY + 11;
			return;
		}// end function
		
		public function tryUnlockExternalBalance() : void
		{
			trace("[GameDispatcher] tryUnlockExternalBalance, gameState = " + gameData.state + ", featured = " + gameData.featureRequired);
			if ((gameData.state == GameData.STATE_PLACEBET || gameData.state == GameData.STATE_RESULT) && !gameData.featureRequired && !gameData.bigWinPresentationRequired && !gameData.bAutoState)
			{
				switch(CustomerSpecification.getCustomerId())
				{
					case CustomerSpecification.CUSTOMER_ID_FINSOFT:
					{
						lockBalanceFs(false);
						break;
					}
					case CustomerSpecification.CUSTOMER_ID_GB:
					{
						JSCaller.getInstance().callJsUpdateBannerBalance();
						break;
					}
					default:
					{
						break;
					}
				}
				enableButtonAutoPlay();
			}
			return;
		}// end function
		
		public function get clickMeBonusTotalPayout() : Number
		{
			return gameData.clickMeTotalPayout;
		}// end function
		
		private function showButtons() : void
		{
			this.buttons.showButtons();
			return;
		}// end function
		
		public function sendRequest(param1:String, param2:URLVariables) : void
		{
			var _loc_3:String = null;
			switch(param1)
			{
				case NetDispatcher.ACTION_ENTER:
				{
					_loc_3 = "responses/responseEnter.txt";
					break;
				}
				case NetDispatcher.ACTION_PLACEBET:
				{
					_loc_3 = "responses/responsePlacebet.txt";
					break;
				}
				case NetDispatcher.ACTION_BONUS:
				{
					if (this.clickMeBonusInProgress)
					{
						_loc_3 = "responses/responseClickMe.txt";
						break;
					}
					if (this.freeSpinsBonusInProgress)
					{
						_loc_3 = "responses/responseFreeSpin.txt";
						break;
					}
					if (this.swordFightBonusInProgress)
					{
						_loc_3 = "responses/responseSwordFight.txt";
						break;
					}
					if (this.workerGrogBonusInProgress)
					{
						_loc_3 = "responses/responseWorkerGrog.txt";
						break;
					}
					break;
				}
				case NetDispatcher.ACTION_GETJACKPOT:
				{
					_loc_3 = "responses/responseJackpot.txt";
					break;
				}
				default:
				{
					break;
				}
			}
			if (fButtons_btns != null && fCoinSelector_chc != null)
			{
				disableButtons();
			}
			this.netDispatcher.sendRequest(param1, param2, _loc_3);
			return;
		}// end function
		
		public function updateIndicators() : void
		{
			_indicators.update();
			this.fSyncBalanceDisp_sbd.onUpdateBalanceInGame(SyncBalanceDispatcher.UPDATE_BALANCE_AFTER_INDICATORS_UPDATE);
			return;
		}// end function
		
		private function onShowPaytableButtonClicked(event:Event) : void
		{
			reelsDisp.stopAllSoundIcon();
			this.showPaytable();
			return;
		}// end function
		
		public function get totalWin() : Number
		{
			return gameData.totalWin;
		}// end function
		
		private function releaseBetMax(event:Event) : void
		{
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				if (!isBetAcceptable(Const.MAX_BET_PER_LINE, Const.LINES_COUNT, GameData.getInstance().selectedCoin))
				{
					reelsDisp.betMax();
					this.updateIndicators();
					var _loc_2:* = finsoftDisp;
					_loc_2.finsoftDisp["checkFunds"]();
					return;
				}
			}
			gameData.bBetDeduct = true;
			if (event)
			{
				Buttons(event.target).removeEventListener(Buttons.EVENT_MAX_BET_BUTTON_DISABLED_ANIMATION_COMPLETED, this.releaseBetMax);
			}
			this.disableButtons();
			this.spinButtonClicked = true;
			if (gameData.state == GameData.STATE_RESULT)
			{
				setState(GameData.STATE_PLACEBET);
			}
			reelsDisp.betMax();
			GameData.getInstance().betSum = GameData.getInstance().betSum + GameData.getInstance().getTotalBet() * GameData.getInstance().getCoinValue();
			this.startSpin();
			this.spinButtonClicked = false;
			return;
		}// end function
		
		private function onWorkerGrogBonusReadyToShow(event:Event) : void
		{
			var aEvent_evnt:* = event;
			trace("GameDispatcher.onWorkerGrogBonusReadyToShow() called");
			WorkerGrogBonusController(aEvent_evnt.target).removeEventListener(ExternFeatureController.EVENT_FEATURE_READY_TO_SHOW, this.onWorkerGrogBonusReadyToShow);
			try
			{
				this.removeChild(this.workerGrogBonusController.loadingProgressBar);
			}
			catch (aError_err:Error)
			{
			}
			this.addChild(this.workerGrogBonusController.content);
			this.delegateSoundButtonForTheWorkerBonus();
			this.reelsDisp.visible(false);
			this.hideGameBg();
			this.hideButtons();
			return;
		}// end function
		
		public function get totalNumberOfAutoSpins() : Number
		{
			return gameData.nSpin;
		}// end function
		
		private function errorXMLIsReadyForUsing(event:Event) : void
		{
			trace("[ErrorsController]: on errorXMLIsReadyForUsing in Game Dispatcher ");
			this.initParamsSpecification();
			this.loadCustomerSpecification();
			return;
		}// end function
		
		public function updateBalanceFs(param1:Number) : void
		{
			var _loc_2:* = finsoftDisp;
			_loc_2.finsoftDisp["updateBalanceFs"](param1);
			return;
		}// end function
		
		public function get totalPayout() : Number
		{
			return gameData.getTotalPayout();
		}// end function
		
		public function get soundController() : SoundController
		{
			return this.fSoundController_sc;
		}// end function
		
		private function loadParams() : void
		{
			paramsDisp = new ParamsDispatcher(this);
			paramsDisp.load();
			return;
		}// end function
		
		protected function initParamsSpecification() : void
		{
			var _loc_1:ParamsSpecification = null;
			_loc_1 = new ParamsSpecification();
			_loc_1.netDispatcher = this.netDispatcher;
			_loc_1.gameSWFDirectoryUrl = Const.getFlashURL(this.loaderInfo.url);
			_loc_1.loaderInfoParams = this.loaderInfo.parameters;
			return;
		}// end function
		
		protected function onCryticalErrorOccured(event:Event) : void
		{
			this.showDialogCryticalError();
			return;
		}// end function
		
		public function getConvertedCredits(param1:Number, param2:Boolean = false, param3:Boolean = false) : String
		{
			var _loc_4:Number = NaN;
			_loc_4 = param2 ? (param1 * gameData.getCoinValue()) : (param1 * gameData.storedCoinValue);
			if (param3)
			{
				return ParamsSpecification.formatCurrencyWithSign(_loc_4);
			}
			return Tools.formatCurrency(_loc_4);
		}// end function
		
		public function get SESSIONID() : String
		{
			return this.fSessionId_str;
		}// end function
		
		private function onWildReelBonusAnimationCompleted() : void
		{
			gameData.wildReelRequired = false;
			this.buttons.showMaxBetButton();
			this.setState(GameData.STATE_RESULT);
			return;
		}// end function
		
		public function updateBalanceGv(param1:Number) : void
		{
			var _loc_2:Object = null;
			_loc_2 = Object(this.parent.parent.parent);
			_loc_2.updateBalance(param1);
			return;
		}// end function
		
		private function _setSoundOn(param1:Boolean) : void
		{
			this._fSoundOn_bl = param1;
			if (this.fSoundController_sc != null)
			{
				this.fSoundController_sc.soundOn = this._fSoundOn_bl;
			}
			return;
		}// end function
		
		public function onServerSpecificSwfLoaded() : void
		{
			this.initializeGame();
			this.tryToStartFeaturesAssetsModulesLoading();
			return;
		}// end function
		
		protected function get clickMeFeatureContoller() : ClickMeFeatureController
		{
			if (!this.fClickMeFeatureController_cfc)
			{
				this.fClickMeFeatureController_cfc = new ClickMeFeatureController();
			}
			return this.fClickMeFeatureController_cfc;
		}// end function
		
		public function get KEY() : String
		{
			return this.fValidationKey_str;
		}// end function
		
		private function showPaytable() : void
		{
			disableButtons();
			this.stopToShowStandardWin();
			if (!this.paytableDispatcher.isLoaded)
			{
				this.paytableDispatcher.addEventListener(FeatureLoader.EVENT_LOADING_COMPLETED, this.onPaytableLoadingCompleted, false, 1);
				this.addChild(this.paytableDispatcher.loadingProgressBar);
				this.delegateSoundButtonForThePaytablePreloader();
			}
			this.paytableDispatcher.addEventListener(ExternFeatureController.EVENT_FEATURE_READY_TO_SHOW, this.onPaytableReady);
			this.paytableDispatcher.addEventListener(PaytableDispatcher.EVENT_PAYTABLE_CLOSED, this.onPaytableClosed);
			this.paytableDispatcher.startPaytable();
			return;
		}// end function
		
		private function continueFreeSpinsBonus() : void
		{
			if (!reelsDisp.spinStopped)
			{
				reelsDisp.stopSpin(this.showFreeSpinsWin);
				return;
			}
			return;
		}// end function
		
		private function get workerGrogBonusController() : WorkerGrogBonusController
		{
			if (!this.fWorkerGrogBonus_wgb)
			{
				this.initWorkerGrogBonusController();
			}
			return this.fWorkerGrogBonus_wgb;
		}// end function
		
		private function disableChooseCoin() : void
		{
			fCoinSelector_chc.disable();
			return;
		}// end function
		
		public function startFreeSpinsFeature(param1:Boolean = true) : void
		{
			if (param1)
			{
				this.freeSpinsFeatureController.startFeature();
			}
			else
			{
				this.startFreeSpinsBonus();
			}
			return;
		}// end function
		
		private function get wildReelBonusInProgress() : Boolean
		{
			return this.reelsDisp.wildReelBonusInProgress;
		}// end function
		
		public function get freeSpinsRemains() : int
		{
			return gameData.freeSpinsRemains;
		}// end function
		
		private function onLanguageXmlLoaded(event:Event = null) : void
		{
			initPlayer();
			srartPlayerPlay();
			if (event)
			{
				TranslationController(event.target).removeEventListener(TranslationController.EVENT_LANGUAGE_XML_LOADED, this.onLanguageXmlLoaded);
			}
			this.loading();
			this.addEventListener(GameDispatcher.EVENT_SOUNDS_READY, this.onGameLoadingAnimationStarted);
			this.play();
			return;
		}// end function
		
		public function setSoundFromGv(param1:Boolean) : void
		{
			trace("[GameDispatcher]: setSoundFromGv " + param1);
			trace("[GameDispatcher]: setSoundFromGv " + fButtons_btns);
			trace("[GameDispatcher]: setSoundFromGv " + soundController);
			buttons.updateSoundButtons(param1);
			this.soundController.setSound(param1);
			return;
		}// end function
		
		private function onAdded(event:Event = null) : void
		{
			var _loc_2:Object = null;
			trace("[GameDispatcher] onAdded " + isHostChekingCompleted_bln + " " + isAddedToStage_bln);
			if (!this.isHostChekingCompleted_bln || this.isAddedToStage_bln)
			{
				return;
			}
			stop();
			this.isAddedToStage_bln = true;
			_loc_2 = LoaderInfo(this.root.loaderInfo).parameters;
			Const.SITEPATH = String(_loc_2["sitepath"]);
			fGameDispatcher_gd = this;
			AssetsLibrary.getInstance().addLibrary(this.loaderInfo.applicationDomain);
			new PerformanceController(this);
			initErrorController();
			this.fSyncBalanceDisp_sbd = new SyncBalanceDispatcher();
			this.fSyncBalanceDisp_sbd.init(this);
			this.fSyncBalanceDisp_sbd.initSyncBalance();
			this.initPlayerDispatcher();
			JSCaller.getInstance().setCallbackGetBonusRoundState();
			return;
		}// end function
		
		private function initReels() : void
		{
			this.initReelsTC();
			return;
		}// end function
		
		private function changeCoin(param1:Number = -1)
		{
			if (param1 > -1)
			{
				fCoinSelector_chc.setValue(param1);
			}
			else
			{
				fCoinSelector_chc.nextValue();
			}
			this.update();
			return;
		}// end function
		
		private function startToShowWin() : void
		{
			trace("1_START_TO_SHOW_WIN");
			if (!gameData.featureRequired && gameData.bigWinPresentationRequired && (gameData.freeSpinsPayout > 0 || gameData.clickMeTotalPayout > 0))
			{
				this.startBigWinPresentation();
			}
			else if (gameData.standardGameWin > 0)
			{
				this.startToShowStandardWin(this.onStandardWinShowed);
			}
			else if (gameData.featureRequired)
			{
				this.startNextRequiredFeature();
			}
			else if (gameData.bAutoState)
			{
				var _loc_1:* = gameData;
				var _loc_2:* = gameData.nAutoSpin - 1;
				_loc_1.nAutoSpin = _loc_2;
				if (gameData.nAutoSpin == 0)
				{
					gameData.bAutoState = false;
					update();
					autoPlayDisp.setButtonAutoPlay(true);
					if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
					{
						lockBalanceFs(false);
					}
				}
				else
				{
					clearTimeout(time1);
					time1 = setTimeout(releaseSpin, 1500);
				}
			}
			return;
		}// end function
		
		private function onWorkerGrogBonusHeadSelected(event:Event) : void
		{
			var _loc_2:URLVariables = null;
			this.dispatchEvent(event);
			_loc_2 = new URLVariables();
			_loc_2.CHOICE = 0;
			sendRequest(NetDispatcher.ACTION_BONUS, _loc_2);
			return;
		}// end function
		
		public function get winPresentationPeriod() : int
		{
			return this.reelsDisp.winPresentationPeriod;
		}// end function
		
		public function updateButtons() : void
		{
			var _loc_1:Boolean = false;
			var _loc_2:Boolean = false;
			var _loc_3:Boolean = false;
			trace("GameDispatcher.updateButtons() called");
			trace("GameDispatcher.updateButtons(): featureRequired = " + gameData.featureRequired);
			if ((GameData.getInstance().state == GameData.STATE_PLACEBET || GameData.getInstance().state == GameData.STATE_RESULT) && !GameData.getInstance().featureRequired)
			{
				GameData.getInstance().isFeature = false;
				JSCaller.getInstance().callJSBonusRoundComplete();
			}
			else
			{
				GameData.getInstance().isFeature = true;
			}
			if ((gameData.state == GameData.STATE_PLACEBET || gameData.state == GameData.STATE_RESULT) && !gameData.featureRequired && !gameData.bigWinPresentationRequired && !this.spinButtonClicked && !gameData.bAutoState && !this.spinInProgress)
			{
				this.fSyncBalanceDisp_sbd.roundCompleted = true;
				this.fSyncBalanceDisp_sbd.onRoundCompleted();
				if (GameData.getInstance().freeRoundsMode)
				{
					this.buttons.disableBetPerLineButton();
					this.buttons.disableMaxBetButton();
					this.buttons.disableSelectLinesButton();
					this.buttons.enableSpinButton();
					this.buttons.enablePaytableButton();
					checkBonusMessage();
					checkErrorCode();
					return;
				}
				gameData.showButtonAutoSpin = true;
				if (isLastHand)
				{
					disableButtonAutoPlay();
				}
				else
				{
					enableButtonAutoPlay();
				}
				this.buttons.enableSelectLinesButton();
				_loc_1 = gameData.selectedLines > 0;
				if (_loc_1)
				{
					this.buttons.enableBetPerLineButton();
				}
				else
				{
					this.buttons.disableBetPerLineButton();
				}
				_loc_2 = gameData.selectedLines > 0 && gameData.betCoins > 0 && isBetAcceptable(gameData.betCoins, gameData.selectedLines, gameData.selectedCoin);
				if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
				{
					_loc_2 = gameData.selectedLines > 0 && gameData.betCoins > 0;
					trace("Update Spin Btn for FINSOFT: enabled = " + _loc_2);
				}
				if (_loc_2)
				{
					this.buttons.enableSpinButton();
				}
				else
				{
					this.buttons.disableSpinButton();
				}
				_loc_3 = isBetAcceptable(Const.MAX_BET_PER_LINE, Const.LINES_COUNT, gameData.selectedCoin);
				if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
				{
					_loc_3 = true;
					trace("Update MaxBet Btn for FINSOFT: enabled = " + _loc_3);
				}
				if (_loc_3)
				{
					this.buttons.enableMaxBetButton();
				}
				else
				{
					this.buttons.disableMaxBetButton();
				}
				this.buttons.enablePaytableButton();
				this.enableChooseCoin();
				checkBonusMessage();
				checkErrorCode();
			}
			else
			{
				this.disableButtons();
				this.fSyncBalanceDisp_sbd.roundCompleted = false;
			}
			return;
		}// end function
		
		private function tryToStartGame() : void
		{
			if (this.fEnterResponseHasBeenReceived_bl && !this.fGameIntroSoundCompleted_bl)
			{
				this.allowTheUserToSkipIntroSound();
				return;
			}
			if (this.fEnterResponseHasBeenReceived_bl && this.fGameIntroSoundCompleted_bl)
			{
				this.startGame();
			}
			return;
		}// end function
		
		private function initChooseCoin()
		{
			trace("[GameDispatcher] initChooseCoin, isCreditsDisplay = " + ParamsSpecification.isCreditsDisplay);
			fCoinSelector_chc = new ChooseCoin(this["chooseCoin"]);
			this.fCoinSelector_chc.addEventListener(ChooseCoin.EVENT_COIN_CLICKED, this.dispatchEvent);
			fCoinSelector_chc.setValue(gameData.selectedCoin);
			setCoinValue();
			disableChooseCoin();
			return;
		}// end function
		
		public function animatePreloader(param1:Number) : void
		{
			var lGamePreloaderProgressBar:GamePreloaderProgressBar;
			var percent:* = param1;
			if (prevPercent > percent)
			{
				return;
			}
			lGamePreloaderProgressBar = GamePreloaderProgressBar(this["progressBar_mc"]);
			if (lGamePreloaderProgressBar)
			{
				try
				{
					lGamePreloaderProgressBar.progress(percent);
					this["tfLoader"].text = "Loaded " + percent + "%";
				}
				catch (e)
				{
				}
			}
			prevPercent = percent;
			return;
		}// end function
		
		public function initCreditsDisplayed(param1:Boolean, param2:String = "") : void
		{
			trace("[GameDispatcher] initCreditsDisplayed isCredits " + param1 + " currency = " + param2);
			ParamsSpecification.isCreditsDisplay = param1;
			if (param1)
			{
				return;
			}
			if (param2.toUpperCase() == "GBP")
			{
				ParamsSpecification.setCurrencySign("£", "");
			}
			else
			{
				ParamsSpecification.setCurrencySign("", " " + param2);
			}
			if (Const.URL_CASHIER != "" && Const.URL_CASHIER != null)
			{
				ParamsSpecification.setRealMode(true);
			}
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				if (!ParamsSpecification.isRealMode())
				{
					ParamsSpecification.setCurrencySign(Const.CURRENCY_FUN, "");
				}
			}
			return;
		}// end function
		
		private function initReelsTC(event:Event = null) : void
		{
			if (event)
			{
				ReelsDispatcher(event.target).removeEventListener(ReelsDispatcher.EVENT_REELS_READY_FOR_TRANSLATION_CONTROLLER_INITIALIZATION, this.initReelsTC);
			}
			if (!reelsDisp.reelsReadyForTCInit)
			{
				this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_REELS_READY_FOR_TRANSLATION_CONTROLLER_INITIALIZATION, this.initReelsTC);
				return;
			}
			reelsDisp.initReelsTC();
			this.initReelsController();
			return;
		}// end function
		
		private function getParamsGv() : void
		{
			var _loc_1:Object = null;
			var _loc_2:Array = null;
			_loc_1 = Object(this.parent.parent.parent);
			_loc_2 = _loc_1.getParams();
			Const.SESSIONID = _loc_2[0];
			Const.DBLINK = _loc_2[1];
			trace("[GameDispatcher]: getParamsGv SESSIONID " + Const.SESSIONID);
			trace("[GameDispatcher]: getParamsGv DBLINK " + Const.DBLINK);
			return;
		}// end function
		
		public function set soundOn(param1:Boolean) : void
		{
			this._setSoundOn(param1);
			return;
		}// end function
		
		private function delegateSoundButtonForTheSwordFightBonusPreloader() : void
		{
			this.addChild(this.buttons.soundButton);
			this.buttons.soundButton.x = 145;
			this.buttons.soundButton.y = 14.8;
			return;
		}// end function
		
		public function get swordFightBonusTotalPayout() : int
		{
			return gameData.swordFightBonusTotalPayout;
		}// end function
		
		public function startClickMeFeature(param1:Boolean = true) : void
		{
			trace("[GameDispatcher]:startClickMeFeature !!!!!! ");
			if (param1)
			{
				trace("clickMeFeatureContoller = " + clickMeFeatureContoller);
				this.clickMeFeatureContoller.startFeature();
			}
			else
			{
				this.startClickMeBonus();
			}
			return;
		}// end function
		
		private function get clickMeBonusInProgress() : Boolean
		{
			return reelsDisp.clickMeBonusInProgress;
		}// end function
		
		public function showDialogErrorGV(param1:String) : void
		{
			this.fDialogsController.showDialog(DialogManager.DIALOG_ERROR_GV, param1);
			return;
		}// end function
		
		private function onClickMePayoutShowed(event:Event) : void
		{
			this.updateIndicators();
			return;
		}// end function
		
		protected function onWildReelIntroAnimationStarted(event:Event)
		{
			this.buttons.hideMaxBetButton();
			return;
		}// end function
		
		private function delegateSoundButtonForTheWorkerGrogBonusPreloader() : void
		{
			this.addChild(this.buttons.soundButton);
			this.buttons.soundButton.x = 145;
			this.buttons.soundButton.y = 14.8;
			return;
		}// end function
		
		private function allowTheUserToSkipIntroSound() : void
		{
			var _loc_1:MovieClip = null;
			var _loc_2:SimpleButton = null;
			var _loc_3:FrameChecker = null;
			_loc_1 = this["clickToStart_mc"];
			if (_loc_1.currentLabel != "clickToStart_lb")
			{
				_loc_3 = new FrameChecker();
				_loc_3.checkLabel(_loc_1, "clickToStart_lb", this.allowTheUserToSkipIntroSound);
				_loc_1.gotoAndStop("clickToStart_lb");
				return;
			}
			_loc_2 = _loc_1["clickToStart_btn"];
			_loc_2.addEventListener(MouseEvent.CLICK, this.onSkipIntroSoundCommand);
			return;
		}// end function
		
		private function onBetPerLineButtonClicked(event:Event) : void
		{
			this.dispatchEvent(event);
			this.releaseBetOne();
			return;
		}// end function
		
		private function startSwordFightBonusWinCombinationPresentation() : void
		{
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_SWORD_FIGHT_BONUS_WIN_COMBINATION_PRESENTATION_STARTED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_SWORD_FIGHT_BONUS_WIN_COMBINATION_PRESENTATION_COMPLETED, this.onSwordFightBonusWinCombinationPresentationCompleted);
			this.reelsDisp.startSwordFightBonusWinCombinationPresentation(gameData.swordFightBonusWinLines);
			return;
		}// end function
		
		protected function get wildReelFeatureController() : WildReelController
		{
			if (!this.fWildReelController_wrc)
			{
				this.fWildReelController_wrc = new WildReelController();
			}
			return this.fWildReelController_wrc;
		}// end function
		
		public function get currentWinLinePayout() : int
		{
			return this.reelsDisp.currentWinLinePayout;
		}// end function
		
		private function get gameBackground() : MovieClip
		{
			if (!this.fGameBackground_mc)
			{
				this.initGameBackground();
			}
			return this.fGameBackground_mc;
		}// end function
		
		public function onErrorResponse(param1:String, param2:Boolean) : void
		{
			switch(param1)
			{
				case GameData.BONUS_EXPIRED:
				{
					dialogController.showDialog(DialogManager.DIALOG_BONUS_EXPIRED, "", param2);
					break;
				}
				case GameData.BONUS_BONUS_CANCELED:
				{
					dialogController.showDialog(DialogManager.DIALOG_BONUS_BONUS_CANCELED, "", param2);
					break;
				}
				case GameData.BONUS_RELEASED:
				{
					dialogController.showDialog(DialogManager.DIALOG_BONUS_RELEASED, "", param2);
					break;
				}
				case GameData.FRB_CANCELLED:
				{
					this.fDialogsController.showDialog(DialogManager.DIALOG_FRB_CANCELLED, "", param2);
					break;
				}
				case GameData.FRB_FINISHED:
				{
					this.fDialogsController.showDialog(DialogManager.DIALOG_FRB_FINISHED, "", param2);
					break;
				}
				default:
				{
					break;
				}
			}
			return;
		}// end function
		
		public function startFreeSpinsBonus() : void
		{
			var _loc_1:Array = null;
			var _loc_2:* = undefined;
			trace("GameDispatcher.startFreeSpinsBonus() started...");
			_loc_1 = new Array();
			_loc_2 = 0;
			while (_loc_2 < gameData.stopReels.length)
			{
				
				if (gameData.stopReels[_loc_2] == 11)
				{
					_loc_1.push(_loc_2);
				}
				_loc_2 = _loc_2 + 1;
			}
			this.onFreeSpinsBonusStarted();
			reelsDisp.startFreeSpinsBonus(this.onFreeSpin, _loc_1, gameData.freeSpinsRemains);
			trace("...GameDispatcher.startFreeSpinsBonus() completed");
			return;
		}// end function
		
		private function delegateSoundButtonForTheSwordFightBonus() : void
		{
			this.addChild(this.buttons.soundButton);
			this.buttons.soundButton.x = 400;
			this.buttons.soundButton.y = 20;
			return;
		}// end function
		
		private function enterOk() : void
		{
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_GV)
			{
				syncSoundBtnWithGv();
			}
			switch(CustomerSpecification.getCustomerId())
			{
				case CustomerSpecification.CUSTOMER_ID_MRGREEN:
				case CustomerSpecification.CUSTOMER_ID_7RED:
				case CustomerSpecification.CUSTOMER_ID_FINSOFT:
				{
					break;
				}
				case CustomerSpecification.CUSTOMER_ID_GB:
				{
					if (ExternalInterface.available)
					{
						ExternalInterface.addCallback("updateBalance", updateBalanceFromThePage);
					}
					break;
				}
				case CustomerSpecification.CUSTOMER_ID_BETKLASS:
				{
					if (CustomerSpecification.getInstance().useCurrency)
					{
						initCreditsDisplayed(false, "");
					}
					break;
				}
				default:
				{
					try
					{
						ExternalInterface.call("enterOk");
					}
					catch (e:Error)
					{
					}
					break;
					break;
				}
			}
			return;
		}// end function
		
		public function initSoundController() : void
		{
			var _loc_1:Boolean = false;
			_loc_1 = this._getSoundOn();
			this.fSoundController_sc = new SoundController();
			this.fSoundController_sc.setGameController(this);
			this.fSoundController_sc.init();
			this.fSoundController_sc.soundOn = _loc_1;
			this.fSoundController_sc.addEventListener(SoundController.EVENT_GAME_INTRO_SOUND_COMPLETED, this.onGameIntroSoundCompleted);
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				if (finsoftDisp)
				{
					var _loc_2:* = finsoftDisp;
					fSoundController_sc.setSound(_loc_2.finsoftDisp["isSound"]());
				}
				else
				{
					fSoundController_sc.setSound(false);
				}
			}
			return;
		}// end function
		
		private function initReelsController(event:Event = null) : void
		{
			var _loc_2:FrameChecker = null;
			if (event)
			{
				ReelsDispatcher(event.target).removeEventListener(ReelsDispatcher.EVENT_REELS_READY_FOR_REELS_INITIALIZATION, this.initReelsController);
			}
			if (!reelsDisp.reelsReadyForInit)
			{
				this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_REELS_READY_FOR_REELS_INITIALIZATION, this.initReelsController);
				return;
			}
			reelsDisp.init(paramsDisp.getParamsXml());
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_WIN_PRESENTATION_STARTED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_WIN_PRESENTATION_INTERRUPTED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_WIN_LINE_PRESENTATION_STARTED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_CLICKME_ICON_INTRO_ANIMATION_COMPLETED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_CLICK_ME_BONUS_STARTED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_CLICK_ME_BONUS_COMPLETED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_CLICKME_BONUS_RESET_COMPLETED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_CLICKME_COLLECT_WIN_ANIMATION_STARTED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_CLICKME_DEPP_FLYING_ANIMATION_STARTED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_CLICKME_DEPP_FLYING_ANIMATION_COMPLETED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_CLICKME_ICON_DRAGGING_STARTED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_FREE_SPINS_INTRO_ANIMATION_STARTED, this.onFreeSpinsIntroAnimationStarted);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_FREE_SPINS_INTRO_ANIMATION_COMPLETED, this.onFreeSpinsIntroAnimationCompleted);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_FREE_SPINS_COMPLETE_ANIMATION_STARTED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_WILD_REEL_BONUS_STARTED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_WILD_REEL_BONUS_INTRO_ANIMATION_STARTED, this.dispatchEvent);
			this.reelsDisp.addEventListener(ReelsDispatcher.EVENT_WILD_REEL_BONUS_INTRO_COMPLETED, this.dispatchEvent);
			this.soundController.setReelsController(reelsDisp);
			this.initInfobar();
			this.initBet();
			if (!this.isLastHand)
			{
				this.setState(GameData.STATE_PLACEBET);
			}
			_loc_2 = new FrameChecker();
			_loc_2.checkLabel(this, Const.LABEL_GAME, this.onGameStarted);
			gotoAndStop(Const.LABEL_GAME);
			this.tabEnabled = false;
			this.focusRect = false;
			this.tabChildren = false;
			return;
		}// end function
		
		protected function set spinButtonClicked(param1:Boolean) : void
		{
			this.fSpinButtonClicked_bl = param1;
			return;
		}// end function
		
		private function progressLoadingPreloader(event:ProgressEvent) : void
		{
			var _loc_2:int = 0;
			_loc_2 = Math.round(40 * event.bytesLoaded / event.bytesTotal);
			if (firstPercent)
			{
				GamePreloaderProgressBar.setStartPercent(_loc_2);
				firstPercent = false;
			}
			animatePreloader(_loc_2);
			return;
		}// end function
		
		public function prepareWorkerGrogBonusToShow() : void
		{
			var _loc_1:Number = NaN;
			this.disableButtons();
			if (!this.workerGrogBonusController.isLoaded)
			{
				this.addChild(this.workerGrogBonusController.loadingProgressBar);
				this.delegateSoundButtonForTheWorkerGrogBonusPreloader();
			}
			this.workerGrogBonusController.addEventListener(ExternFeatureController.EVENT_FEATURE_READY_TO_SHOW, this.onWorkerGrogBonusReadyToShow);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_HEAD_SELECTED_BY_USER, this.onWorkerGrogBonusHeadSelected);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_TAIL_SELECTED_BY_USER, this.onWorkerGrogBonusTailSelected);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_COUNTABLE_VALUE_CHANGING_COMPLETED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_COUNTABLE_VALUE_CHANGING_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_LOOSER_ANIMATION_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_LOOSER_SPEECH_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_WINNER_ANIMATION_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_COIN_ROTATION_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_COIN_ROTATION_STOPPED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_WORKER_DRINKING_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_PLAYER_DRINKING_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_GLASS_PLACED_ON_THE_TABLE, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_GLASS_SHAKING_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_WORKER_POUNDS_THE_TABLE, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_PLAYER_POUNDS_THE_TABLE, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_WORKER_INTRO_SPEECH_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_WORKER_INTRO_SECOND_SPEECH_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_PANEL_MOVING_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_WINNER_FINAL_LAUGH_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_WINNER_ANIMATION_FIRST_HIT, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_WINNER_ANIMATION_SECOND_HIT, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_WINNER_ANIMATION_THIRD_HIT, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_SEAGULL_APPEARED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_WORKER_DRINKING_GRUNT_VOICE_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_WORKER_DRINKING_ARRR_VOICE_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_FINAL_WIN_PANEL_ANIMATION_COMPLETED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_GROG_BONUS_FINAL_WIN_COUNTING_STARTED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_GROG_BONUS_FINAL_WIN_COUNTING_COMPLETED, this.dispatchEvent);
			this.workerGrogBonusController.addEventListener(WorkerGrogBonusController.EVENT_WORKER_BONUS_COMPLETED, this.onWorkerGrogBonusCompleted);
			_loc_1 = 0;
			if (ParamsSpecification.isCreditsDisplay)
			{
				_loc_1 = 0;
			}
			else
			{
				_loc_1 = gameData.storedCoinValue;
			}
			this.workerGrogBonusController.startWorkerGrogBonus(gameData.workerGrogBonusPayout, gameData.workerGrogBonusLasthandWinsHistory, _loc_1);
			return;
		}// end function
		
		public function set DBLINK(param1:String) : void
		{
			trace("[GameDisp]: DBLINK+++++ " + param1);
			this.fDblink_str = param1;
			return;
		}// end function
		
		private function delegateSoundButtonForThePaytablePreloader() : void
		{
			this.moveSoundButtonToFront();
			return;
		}// end function
		
		private function onSelectLinesButtonClicked(event:Event) : void
		{
			this.dispatchEvent(event);
			this.releaseSelectLines();
			return;
		}// end function
		
		public function setFinsoftDispatcher(param1) : void
		{
			trace("[GameDispatcher] setFinsoftDispatcher start");
			finsoftDisp = param1;
			return;
		}// end function
		
		private function releaseBetOne() : void
		{
			gameData.bBetDeduct = true;
			if (gameData.state == GameData.STATE_RESULT)
			{
				setState(GameData.STATE_PLACEBET);
			}
			reelsDisp.betOne();
			this.onBetPerLineChanged();
			return;
		}// end function
		
		private function onWildReelBonusStarted() : void
		{
			this.dispatchEvent(new Event(EVENT_WILD_REEL_BONUS_STARTED));
			this.moveSoundButtonToFront();
			return;
		}// end function
		
		private function onFinishVideoPreviewHandler(event:Event = null) : void
		{
			this.fIsVideoSkipped_bl = true;
			this.fWaitingPreviewVideo_bl = false;
			this.fPlayerController_pc.stop();
			this.soundOn = this.fSoundValue_bl;
			if (this.playerMc != null && this.contains(this.playerMc))
			{
				this.removeChild(this.playerMc);
				this.playerMc = null;
			}
			if (this.fShouldBonusRestart_bl && this.fGameIntroSoundCompleted_bl)
			{
				this.fShouldBonusRestart_bl = false;
				this.startNextRequiredFeature();
			}
			if (this.fDialogsController != null)
			{
				this.fDialogsController.setVisible(true);
			}
			if (this.reelsDisp != null)
			{
				this.reelsDisp.setVisibleReels(true);
			}
			return;
		}// end function
		
		private function startSwordFightBonus() : void
		{
			if (this.isLastHand)
			{
				this.prepareSwordFightBonusToShow();
			}
			else
			{
				this.startSwordFightBonusWinCombinationPresentation();
			}
			return;
		}// end function
		
		protected function get dialogController() : DialogManager
		{
			if (!this.fDialogsController)
			{
				this.initDialogController();
			}
			return this.fDialogsController;
		}// end function
		
		private function stopSwordFightBonusWinCombinationPresentation() : void
		{
			this.reelsDisp.stopSwordFightBonusWinCombinationPresentation();
			return;
		}// end function
		
		private function initWorkerGrogBonusController() : void
		{
			if (this.fWorkerGrogBonus_wgb)
			{
				return;
			}
			this.fWorkerGrogBonus_wgb = new WorkerGrogBonusController(Const.getFlashURL(this.loaderInfo.url));
			return;
		}// end function
		
		private function loadBonusesInBackground() : void
		{
			this.workerGrogBonusController.startWorkerGrogBonusLoading();
			this.swordFightBonusController.startSwordFightBonusLoading();
			return;
		}// end function
		
		private function setCoinValue() : void
		{
			GameData.getInstance().storedCoinValue = GameData.getInstance().getCoinValue();
			return;
		}// end function
		
		public function lockGameUI(param1:Boolean) : void
		{
			if (this.btnBlockUI != null && this.contains(this.btnBlockUI))
			{
				this.removeChild(this.btnBlockUI);
			}
			if (param1)
			{
				this.btnBlockUI = new BTNLockUI();
				this.btnBlockUI.enabled = false;
				this.addChild(this.btnBlockUI);
			}
			return;
		}// end function
		
		protected function showDialogCryticalError() : void
		{
			var url:String;
			var request:URLRequest;
			trace("[GameDispatcher] showDialogCryticalError, getCustomerId = " + CustomerSpecification.getCustomerId());
			trace("[GameDispatcher] showDialogCryticalError, url_sessionerror = " + Const.URL_CASHIER);
			if ((CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_DEMO || CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_BETKLASS || CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_AAMS) && (Const.URL_SESSIONERROR != "" && Const.URL_SESSIONERROR != null))
			{
				url = Const.URL_SESSIONERROR;
				request = new URLRequest(url);
				try
				{
					trace("[GameDispatcher] showDialogCryticalError, try navigate to url = " + url);
					navigateToURL(request, "_self");
				}
				catch (e:Error)
				{
					trace("[GameDispatcher] showDialogCryticalError, catch: cant navigate to url = " + url);
				}
			}
			else
			{
				trace("[GameDispatcher] showDialogCryticalError, showDialog DIALOG_TYPE_CRYTICAL_ERROR");
				this.dialogController.showDialog(DialogManager.DIALOG_TYPE_CRYTICAL_ERROR);
			}
			return;
		}// end function
		
		private function startNextRequiredFeature() : void
		{
			if (gameData.clickMeFeatureRequired)
			{
				this.startClickMeFeature();
				return;
			}
			if (gameData.wildReelRequired)
			{
				startWildReelFeature();
				return;
			}
			if (gameData.freeSpinsFeatureRequired)
			{
				this.startFreeSpinsFeature();
				return;
			}
			if (gameData.workerGrogBonusRequired)
			{
				this.startWorkerGrogBonus();
				return;
			}
			if (gameData.swordFightBonusRequired)
			{
				this.startSwordFightBonus();
				return;
			}
			return;
		}// end function
		
		private function onLinesSelected() : void
		{
			this.dispatchEvent(new Event(EVENT_LINES_SELECTED));
			return;
		}// end function
		
		private function enableChooseCoin() : void
		{
			fCoinSelector_chc.pressHandler = onChangeCoin;
			fCoinSelector_chc.enable();
			return;
		}// end function
		
		public function get workerGrogBonusTotalPayout() : Number
		{
			return gameData.workerGrogBonusTotalPayout;
		}// end function
		
		private function onMainGameSpinStarted() : void
		{
			this.spinInProgress = true;
			this.dispatchEvent(new Event(EVENT_MAIN_GAME_SPIN_STARTED));
			return;
		}// end function
		
		public function setUpdateBalanceUrl(param1:String) : void
		{
			Const.finsoftUpdateBalanceUrl = param1;
			return;
		}// end function
		
		public function enableButtonAutoPlay() : void
		{
			if (autoPlayDisp != null)
			{
				autoPlayDisp.enableButton();
			}
			return;
		}// end function
		
		private function startWorkerGrogBonus() : void
		{
			if (this.isLastHand)
			{
				this.prepareWorkerGrogBonusToShow();
			}
			else
			{
				this.startWorkerGrogBonusWinCombinationPresentation();
			}
			return;
		}// end function
		
		private function completePreloader(event:Event) : void
		{
			trace("[GameDispatcher] completePreloader ");
			this.fillParamsFromPage();
			this.addEventListener(EVENT_GAME_READY_FOR_INIT, this.startGameInitialization);
			switch(CustomerSpecification.getCustomerId())
			{
				case CustomerSpecification.CUSTOMER_ID_TGC:
				{
					this.gotoAndStop(LABEL_VALIDATOR);
					break;
				}
				case CustomerSpecification.CUSTOMER_ID_CSC:
				{
					this.gotoAndStop(LABEL_VALIDATOR);
					break;
				}
				default:
				{
					this.gotoAndPlay(LABEL_LOADING_COMPLETED);
					break;
					break;
				}
			}
			return;
		}// end function
		
		public function onResponse(param1:URLVariables) : void
		{
			if (param1.result.toUpperCase() != NetDispatcher.RESULT_OK)
			{
				if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_GV)
				{
					this.showDialogErrorGV(param1.errorText);
					return;
				}
				throw Error("Invalid response has been received");
			}
			gameData.updateParams(param1);
			if (gameData.limitsChanged)
			{
				callDialogLimitsChanged();
			}
			switch(param1.action)
			{
				case NetDispatcher.ACTION_ENTER:
				{
					setState(GameData.STATE_ENTER_RESPONSE);
					break;
				}
				case NetDispatcher.ACTION_PLACEBET:
				{
					setState(GameData.STATE_PLACEBET_RESPONSE);
					break;
				}
				case NetDispatcher.ACTION_BONUS:
				{
					setState(GameData.STATE_BONUS_RESPONSE);
					break;
				}
				default:
				{
					break;
				}
			}
			return;
		}// end function
		
		private function onSpinButtonClicked(event:Event) : void
		{
			this.dispatchEvent(event);
			this.releaseSpin(true);
			return;
		}// end function
		
		public function onErrorCodeResponse(param1:String, param2:Boolean) : void
		{
			if (ErrorsController.getInstance().errorFromServerMode && ErrorsController.getInstance().isValidError(param1))
			{
				fDialogsController.showDialog(DialogManager.DIALOG_ERROR_CODE, "", param2, param1);
			}
			else
			{
				this.showDialogCryticalError();
			}
			return;
		}// end function
		
		public function get freeSpinsTotalPayout() : Number
		{
			return gameData.freeSpinsPayout;
		}// end function
		
		public function isGameLoaded() : Boolean
		{
			return isGameLoaded_;
		}// end function
		
		private function onSkipIntroSoundCommand(event:Event) : void
		{
			SimpleButton(event.target).removeEventListener(MouseEvent.CLICK, this.onSkipIntroSoundCommand);
			this.dispatchEvent(new Event(EVENT_COMMAND_SKIP_INTRO_SOUND));
			return;
		}// end function
		
		private function get paytableDispatcher() : PaytableDispatcher
		{
			if (!this.fPaytableController_pd)
			{
				this.initPaytableController();
			}
			return this.fPaytableController_pd;
		}// end function
		
		public function get isLastHand() : Boolean
		{
			return gameData.isLastHand;
		}// end function
		
		private function resetWildReel() : void
		{
			reelsDisp.resetWildReel();
			return;
		}// end function
		
		private function get swordFightBonusInProgress() : Boolean
		{
			return this.swordFightBonusController.featureInProgress;
		}// end function
		
		protected function get bigWinController() : BigWinController
		{
			if (!this.fBigWinController_bwc)
			{
				this.fBigWinController_bwc = new BigWinController();
			}
			return this.fBigWinController_bwc;
		}// end function
		
		public function disableButtons() : void
		{
			if (!this.fButtons_btns)
			{
				return;
			}
			if (gameData.bAutoState)
			{
				gameData.showButtonAutoSpin = false;
			}
			else
			{
				disableButtonAutoPlay();
			}
			this.buttons.disableButtons();
			disableChooseCoin();
			return;
		}// end function
		
		protected function get spinButtonClicked() : Boolean
		{
			return this.fSpinButtonClicked_bl;
		}// end function
		
		private function startGame() : void
		{
			this.gameData.initZeroBet();
			this.initDialogController();
			if (!this.fButtons_btns)
			{
				this.initButtons();
			}
			this.initChooseCoin();
			autoPlayDisp = new AutoPlayDispatcher(this);
			this._indicators = new Indicators(this);
			this.initReels();
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT && !isLastHand)
			{
				lockBalanceFs(false);
			}
			if (GameData.getInstance().freeRoundsMode)
			{
				autoPlayDisp.disableAutoplayForAllStates();
			}
			this.fSyncBalanceDisp_sbd.isGameReadyToPlay = true;
			if (this.reelsDisp != null && this.waitingPreviewVideo)
			{
				this.reelsDisp.setVisibleReels(false);
			}
			return;
		}// end function
		
		public function get buttons() : Buttons
		{
			if (!this.fButtons_btns)
			{
				this.initButtons();
			}
			return this.fButtons_btns;
		}// end function
		
		protected function onBonusesAssetsModuleLoaded(event:Event) : void
		{
			this.loadNextFeatureAssetsModule();
			return;
		}// end function
		
		private function restoreSoundButtonAfterWorkerBonus() : void
		{
			this.buttons.restoreSoundButton();
			return;
		}// end function
		
		public function getPlayerMovie() : MovieClip
		{
			return playerMc;
		}// end function
		
		public function get swordFightBonusRequired() : Boolean
		{
			return this.gameData.swordFightBonusRequired;
		}// end function
		
		public function onReelsLoaded(param1:Boolean) : void
		{
			if (!param1)
			{
				return;
			}
			this.initDialogController();
			if (CustomerSpecification.getCustomerId() != CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				this.dialogController.loadServerSpecificSwf();
			}
			else
			{
				onServerSpecificSwfLoaded();
			}
			return;
		}// end function
		
		private function initializeGame() : void
		{
			trace("[GameDispatcher] initializeGame, id = " + CustomerSpecification.getCustomerId());
			gameData = GameData.getInstance();
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				var _loc_1:* = finsoftDisp;
				_loc_1.finsoftDisp["setGameReady"]();
				var _loc_1:* = finsoftDisp;
				if (_loc_1.finsoftDisp["getSessionId"]())
				{
					initSessionByFinsoft(true);
				}
			}
			else
			{
				setState(GameData.STATE_ENTER);
			}
			trace("[GameDispatcher] initializeGame " + CustomerSpecification.tempCurrencySign);
			if (CustomerSpecification.tempCurrencySign != "")
			{
				initCreditsDisplayed(false, CustomerSpecification.tempCurrencySign);
			}
			return;
		}// end function
		
		public function getGameId() : String
		{
			return Const.GAME_ID;
		}// end function
		
		private function onFreeSpinsWinShowed(param1:Object = null) : void
		{
			if (gameData.getTotalPayout() > 0)
			{
				reelsDisp.showWin(false);
			}
			reelsDisp.continueFreeSpinsBonus(this.onFreeSpinsBonusCompleted, gameData.freeSpinsRemains, gameData.freeSpinsPayout);
			return;
		}// end function
		
		public function stopAutoPlay() : void
		{
			trace("[GameDispatcher] stopAutoPlay");
			clearTimeout(time1);
			gameData.bAutoState = false;
			this.dispatchEvent(new Event(EVENT_MAIN_GAME_AUTOSPIN_STOPPED));
			if (reelsDisp.spinStopped)
			{
				update();
				tryUnlockExternalBalance();
			}
			disableButtonAutoPlay();
			return;
		}// end function
		
		public function setSoundFromFinsoft(param1:Boolean = true) : void
		{
			trace("[GameDispatcher]: setSoundFromFinsoft , value = " + param1);
			if (soundController != null)
			{
				soundController.setSound(param1);
			}
			return;
		}// end function
		
		protected function onAllFeaturesAssetsModulesLoaded() : void
		{
			trace("GameDispatcher.onAllFeaturesAssetsModulesLoaded() called");
			this.loadBonusesInBackground();
			return;
		}// end function
		
		private function hideGameBg() : void
		{
			try
			{
				this.removeChild(this.gameBackground);
			}
			catch (aError_err:Error)
			{
			}
			return;
		}// end function
		
		public function get clickMeBonusController() : EventDispatcher
		{
			return reelsDisp.clickMeBonusController;
		}// end function
		
		private function continueBonus() : void
		{
			if (this.clickMeBonusInProgress)
			{
				this.continueClickMeBonus();
				return;
			}
			if (this.freeSpinsBonusInProgress)
			{
				this.continueFreeSpinsBonus();
				return;
			}
			if (this.workerGrogBonusInProgress)
			{
				this.continueWorkerGrogBonus();
				return;
			}
			if (this.swordFightBonusInProgress)
			{
				this.continueSwordFightBonus();
				return;
			}
			return;
		}// end function
		
		public function updateBalanceFromThePage(param1:Number) : void
		{
			if (isNaN(param1))
			{
				return;
			}
			gameData.balance = param1;
			if (!_indicators)
			{
				return;
			}
			if (!isBetAcceptable(gameData.betCoins, gameData.selectedLines, gameData.selectedCoin))
			{
				reelsDisp.resetBetOne();
			}
			update();
			return;
		}// end function
		
		public function startSpin(event:Event = null) : void
		{
			var _loc_2:URLVariables = null;
			var _loc_3:String = null;
			this.removeEventListener(EVENT_CLICKME_BONUS_RESET_COMPLETED, this.startSpin);
			if (this.gameData.betController.betChanged && gameData.holdWildReelForTheNextSpin)
			{
				this.fDialogsController.showDialog(DialogManager.DIALOG_TYPE_COLLECTED_BONUS_WILL_BE_LOST);
				return;
			}
			JSCaller.getInstance().callJsLockManualBalanceUpdate();
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				lockBalanceFs(true);
			}
			if (!gameData.holdWildReelForTheNextSpin)
			{
				this.resetWildReel();
			}
			if (this.fClickMeBonusResetRequired_bl)
			{
				this.fClickMeBonusResetRequired_bl = false;
				this.addEventListener(EVENT_CLICKME_BONUS_RESET_COMPLETED, this.startSpin);
				this.resetClickMeBonus();
				return;
			}
			this.gameData.applyPlanningBet();
			this.update();
			reelsDisp.startSpin();
			_loc_2 = new URLVariables();
			_loc_3 = gameData.selectedCoin + "|";
			_loc_3 = _loc_3 + (gameData.getTotalBet() + "|");
			_loc_3 = _loc_3 + String(gameData.betCoins);
			_loc_2.BET = _loc_3;
			setCoinValue();
			trace("GameDispatcher.startSpin(): sendRequest() called");
			sendRequest(NetDispatcher.ACTION_PLACEBET, _loc_2);
			this.onMainGameSpinStarted();
			this.fSyncBalanceDisp_sbd.onUpdateBalanceInGame(SyncBalanceDispatcher.UPDATE_BALANCE_AFTER_SPIN_START);
			return;
		}// end function
		
		public function get freeSpinsBonusInProgress() : Boolean
		{
			return reelsDisp.freeSpinsBonusInProgress;
		}// end function
		
		private function onFreeSpin(param1:Object) : void
		{
			if (!gameData.holdWildReelForTheNextSpin)
			{
				this.resetWildReel();
			}
			reelsDisp.startSpin();
			sendRequest(NetDispatcher.ACTION_BONUS, new URLVariables());
			return;
		}// end function
		
		private function callDialogLimitsChanged() : void
		{
			trace("[GameDispatcher]: callDialogLimitsChanged >>>>>>>>>>>>>>>");
			this.fDialogsController.showDialog(DialogManager.DIALOG_TYPE_LIMITS_CHANGED);
			return;
		}// end function
		
		private function showFreeSpinsWin() : void
		{
			if (gameData.getTotalPayout() > 0)
			{
				this.updateIndicators();
				reelsDisp.showWin(true, this.onFreeSpinsWinShowed);
			}
			else
			{
				this.onFreeSpinsWinShowed();
			}
			return;
		}// end function
		
		public function disableButtonAutoPlay() : void
		{
			autoPlayDisp.disableButton();
			return;
		}// end function
		
		private function hideButtons() : void
		{
			this.buttons.hideButtons();
			return;
		}// end function
		
		public function lockBalanceFs(param1:Boolean) : void
		{
			trace("[GameDispatcher]:lockBalanceFs " + param1);
			var _loc_2:* = finsoftDisp;
			_loc_2.finsoftDisp["lockBalanceFs"](param1);
			return;
		}// end function
		
		public function checkErrorCode() : void
		{
			if (GameData.getInstance().errorCode != "")
			{
				onErrorCodeResponse(GameData.getInstance().errorCode, GameData.getInstance().getTerminate());
				GameData.getInstance().errorCode = "";
				GameData.getInstance().setTerminate(false);
			}
			return;
		}// end function
		
		private function initGameBackground() : void
		{
			if (this.fGameBackground_mc)
			{
				return;
			}
			this.fGameBackground_mc = this["gameBackground_mc"];
			this.fGameBackgroungDepthIndex_num = this.getChildIndex(this.fGameBackground_mc);
			return;
		}// end function
		
		public function showWarningBalance() : void
		{
			if (GameData.getInstance().freeRoundsMode)
			{
				return;
			}
			if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
			{
				var _loc_1:* = finsoftDisp;
				_loc_1.finsoftDisp["checkFunds"]();
				return;
			}
			showDialogNotEnoughMoneyForTheBet();
			return;
		}// end function
		
		protected function onEventAssetsLoading(event:Event) : void
		{
			TranslationController.getInstance().translationSWFLoader.startLoading(TranslationController.getInstance().translationAssetsSWFUrl);
			return;
		}// end function
		
		public static function getInstance() : GameDispatcher
		{
			return fGameDispatcher_gd;
		}// end function
		
	}
}
